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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
|
Index: lesstif2-0.95.0/ac_debug.m4
===================================================================
--- lesstif2-0.95.0.orig/ac_debug.m4 2004-02-01 16:49:40.000000000 +0100
+++ lesstif2-0.95.0/ac_debug.m4 2006-07-11 11:11:36.000000000 +0200
@@ -4,6 +4,90 @@
dnl Source code which depends on this is mostly in
dnl DebugUtil.c/.h
dnl
+AC_DEFUN(LT_WITH_DMALLOC,
+[AC_MSG_CHECKING(if malloc debugging is wanted)
+AC_ARG_WITH(dmalloc,
+[ --with-dmalloc[=path] use dmalloc, see INSTALL(.html) for reference],
+[if test "$withval" = no; then
+ AC_MSG_RESULT(no)
+else
+dnl We overwrite the variables since we won't continue in
+dnl case of an error!
+dnl We modify CFLAGS, and also link libs (LDFLAGS) and programs (LIBS)
+ if test "$withval" != yes; then
+dnl a path was given
+ CFLAGS="$CFLAGS -I$withval/include -DDMALLOC_FUNC_CHECK"
+
+ LDFLAGS="$LDFLAGS -L$withval/lib -ldmalloc"
+ LIBS="$LIBS -L$withval/lib -ldmalloc"
+ else
+dnl no path was given
+ CFLAGS="$CFLAGS -DDMALLOC_FUNC_CHECK"
+ LDFLAGS="$LDFLAGS -ldmalloc"
+ LIBS="$LIBS -ldmalloc"
+ fi
+ AC_TRY_LINK(
+ [#include <dmalloc.h>],
+ [char *ptr;
+ ptr=malloc(1);
+ free(ptr);
+ ],
+ [AC_DEFINE(WITH_DMALLOC,1,
+ [Define if using the dmalloc debugging malloc package])
+ AC_MSG_RESULT(Using dmalloc)],
+ AC_MSG_ERROR(dmalloc not found)
+ )
+fi],
+[AC_MSG_RESULT(no)])
+])
+
+
+dnl
+dnl Enable another malloc checker for debugging purposes
+dnl Source code which depends on this is mostly in
+dnl DebugUtil.c/.h
+dnl
+AC_DEFUN(LT_WITH_DBMALLOC,
+[AC_MSG_CHECKING(if malloc debugging is wanted)
+AC_ARG_WITH(dbmalloc,
+[ --with-dbmalloc[=path] use dbmalloc, see INSTALL(.html) for reference],
+[if test "$withval" = no; then
+ AC_MSG_RESULT(no)
+else
+dnl We overwrite the variables since we won't continue in
+dnl case of an error!
+dnl We modify CFLAGS, and also link libs (LDFLAGS) and programs (LIBS)
+ if test "$withval" != yes; then
+dnl a path was given
+ CFLAGS="$CFLAGS -I$withval/include"
+
+ LDFLAGS="$LDFLAGS -L$withval/lib -ldbmalloc"
+ LIBS="$LIBS -L$withval/lib -ldbmalloc"
+ else
+dnl no path was given
+ LDFLAGS="$LDFLAGS -ldbmalloc"
+ LIBS="$LIBS -ldbmalloc"
+ fi
+ AC_TRY_LINK(
+ [#include <dbmalloc.h>],
+ [char *ptr;
+ ptr=malloc(1);
+ free(ptr);
+ ],
+ [AC_DEFINE(WITH_DBMALLOC,1,
+ [Define if using the dbmalloc debugging malloc package])
+ AC_MSG_RESULT(Using dbmalloc)],
+ AC_MSG_ERROR(dbmalloc not found)
+ )
+fi],
+[AC_MSG_RESULT(no)])
+])
+dnl
+dnl Enable malloc checker for debugging purposes
+dnl See http://dmalloc.com, INSTALL(.html) for references to this.
+dnl Source code which depends on this is mostly in
+dnl DebugUtil.c/.h
+dnl
AC_DEFUN([LT_WITH_DMALLOC],
[AC_MSG_CHECKING(if malloc debugging is wanted)
AC_ARG_WITH(dmalloc,
Index: lesstif2-0.95.0/ac_find_xft.m4
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ lesstif2-0.95.0/ac_find_xft.m4 2006-07-11 11:11:44.000000000 +0200
@@ -0,0 +1,299 @@
+dnl
+dnl $Header: /home/kobras/cvsroot/debian/lesstif1-1/ac_find_xft.m4,v 1.1 2004/05/27 10:48:25 kobras Exp $
+dnl
+dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.7 2002/08/01 15:57:25 keithp Exp $
+dnl
+dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+dnl Manipulated into AC_FIND_XFT macro by Danny Backx (also © 2002).
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Keith Packard not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Keith Packard makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+
+AC_DEFUN(AC_FIND_XFT,
+[
+AH_TEMPLATE([HAVE_FREETYPE], [We have the FreeType library])
+AH_TEMPLATE([HAVE_FONTCONFIG], [We have the fontconfig library])
+AH_TEMPLATE([HAVE_XRENDER], [We have the fontconfig library])
+AH_TEMPLATE([FC_DEFAULT_FONTS], [We have the fontconfig library])
+AH_TEMPLATE([X_FONT_DIR], [We have the fontconfig library])
+AH_TEMPLATE([CONFDIR], [We have the fontconfig library])
+AH_TEMPLATE([USE_XFT], [We have the fontconfig library])
+
+AC_ARG_WITH(freetype_includes, [ --with-freetype-includes=DIR Use FreeType includes in DIR], freetype_includes=$withval, freetype_includes=yes)
+AC_ARG_WITH(freetype_lib, [ --with-freetype-lib=DIR Use FreeType library in DIR], freetype_lib=$withval, freetype_lib=yes)
+AC_ARG_WITH(freetype_config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
+dnl AC_ARG_WITH(expat, [ --with-expat=DIR Use Expat in DIR], expat=$withval, expat=yes)
+dnl AC_ARG_WITH(expat_includes, [ --with-expat-includes=DIR Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes)
+dnl AC_ARG_WITH(expat_lib, [ --with-expat-lib=DIR Use Expat library in DIR], expat_lib=$withval, expat_lib=yes)
+AC_ARG_WITH(default_fonts, [ --with-default-fonts=DIR Use fonts from DIR when config is busted], defaultfonts="$withval", default_fonts=yes)
+dnl AC_ARG_WITH(confdir, [ --with-confdir=DIR Use DIR to store configuration files (default /etc/fonts)], confdir="$withval", confdir=yes)
+AC_ARG_WITH(fontconfig_includes, [ --with-fontconfig-includes=DIR Use Fontconfig includes in DIR], fontconfig_includes=$withval, fontconfig_includes=yes)
+AC_ARG_WITH(fontconfig_lib, [ --with-fontconfig-lib=DIR Use Fontconfig library in DIR], fontconfig_lib=$withval, fontconfig_lib=yes)
+AC_ARG_WITH(fontconfig_config, [ --with-fontconfig-config=PROG Use Fontconfig configuration program PROG], fontconfig_config=$withval, fontconfig_config=yes)
+AC_ARG_ENABLE(xrender, [ --enable-xrender Enable Xrender])
+
+# Using x libraries, set X font directory
+case "$no_x" in
+yes)
+ ;;
+*)
+ X_FONT_DIR="$x_libraries/X11/fonts"
+ AC_DEFINE_UNQUOTED(X_FONT_DIR,$X_FONT_DIR)
+ ;;
+esac
+AC_SUBST(X_FONT_DIR)
+
+#
+# Check freetype configuration
+#
+case "$freetype_config" in
+no)
+ ;;
+yes)
+ AC_CHECK_PROG(ft_config,freetype-config,freetype-config,no)
+ ;;
+*)
+ ft_config="$freetype_config"
+ ;;
+esac
+
+case "$freetype_includes" in
+no)
+ FREETYPE_CFLAGS=""
+ ;;
+yes)
+ case "$ft_config" in
+ no)
+ FREETYPE_CFLAGS=""
+ ;;
+ *)
+ FREETYPE_CFLAGS="`$ft_config --cflags`"
+ ;;
+ esac
+ ;;
+*)
+ FREETYPE_CFLAGS="-I$freetype_includes"
+ ;;
+esac
+
+case "$freetype_lib" in
+no)
+ freetype_lib=""
+ ;;
+yes)
+ case "$ft_config" in
+ no)
+ freetype_lib=""
+ ;;
+ *)
+ freetype_lib="`$ft_config --libs`"
+ ;;
+ esac
+ ;;
+*)
+ freetype_lib="-L$freetype_lib -lfreetype"
+ ;;
+esac
+
+saved_LIBS="$LIBS"
+LIBS="$LIBS $freetype_lib"
+saved_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
+AC_CHECK_HEADERS(freetype/freetype.h)
+
+HAVEFREETYPE="no"
+case "$ac_cv_header_freetype_freetype_h" in
+no)
+ CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
+ ;;
+yes)
+ AC_CHECK_FUNCS(FT_Init_FreeType)
+ case "$ac_cv_func_FT_Init_FreeType" in
+ no)
+ CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
+ ;;
+ yes)
+ HAVEFREETYPE="yes"
+ AC_DEFINE(HAVE_FREETYPE)
+ AC_SUBST(FREETYPE_CFLAGS)
+ ;;
+ esac
+ ;;
+esac
+
+case "$default_fonts" in
+yes)
+ FC_DEFAULT_FONTS="/usr/share/fonts"
+ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts")
+ ;;
+*)
+ FC_DEFAULT_FONTS="$default_fonts"
+ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts")
+ ;;
+esac
+
+AC_SUBST(FC_DEFAULT_FONTS)
+
+#
+# Set CONFDIR and FONTCONFIG_PATH
+#
+
+case "$confdir" in
+no|yes)
+ confdir=/etc/fonts
+ ;;
+*)
+ ;;
+esac
+AC_SUBST(confdir)
+CONFDIR='${confdir}'
+AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR")
+AC_SUBST(CONFDIR)
+
+#
+# Check X configuration
+#
+HAVEXRENDER="no"
+case "$enable_xrender" in
+no)
+ ;;
+*)
+ XRENDER_CFLAGS="-I$x_includes"
+ XRENDER_LIBS="-L$x_libraries -lXft -lXrender"
+
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $XRENDER_LIBS"
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
+ AC_CHECK_HEADERS(X11/extensions/Xrender.h)
+
+ case "$ac_cv_header_X11_extensions_Xrender_h" in
+ no)
+ CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
+ ;;
+ yes)
+ AC_CHECK_FUNCS(XRenderParseColor)
+ case "$ac_cv_func_XRenderParseColor" in
+ no)
+ CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
+ ;;
+ yes)
+ HAVEXRENDER="yes"
+ AC_DEFINE(HAVE_XRENDER)
+ AC_SUBST(XRENDER_CFLAGS)
+ AC_SUBST(XRENDER_LIBS)
+ ;;
+ esac
+ ;;
+ esac
+
+ ;;
+esac
+
+#
+# Check fontconfig configuration
+#
+case "$fontconfig_config" in
+no)
+ ;;
+yes)
+ AC_CHECK_PROG(fc_config,fontconfig-config,fontconfig-config,no)
+ ;;
+*)
+ fc_config="$fontconfig_config"
+ ;;
+esac
+
+case "$fontconfig_includes" in
+no)
+ FONTCONFIG_CFLAGS=""
+ ;;
+yes)
+ case "$fc_config" in
+ no)
+ FONTCONFIG_CFLAGS=""
+ ;;
+ *)
+ FONTCONFIG_CFLAGS="`$fc_config --cflags`"
+ ;;
+ esac
+ ;;
+*)
+ FONTCONFIG_CFLAGS="-I$fontconfig_includes"
+ ;;
+esac
+
+case "$fontconfig_lib" in
+no)
+ fontconfig_lib=""
+ ;;
+yes)
+ case "$fc_config" in
+ no)
+ fontconfig_lib=""
+ ;;
+ *)
+ FONTCONFIG_LIBS="`$fc_config --libs`"
+ ;;
+ esac
+ ;;
+*)
+ FONTCONFIG_LIBS="-L$fontconfig_lib -lfontconfig"
+ ;;
+esac
+
+saved_LIBS="$LIBS"
+LIBS="$LIBS $FONTCONFIG_LIBS"
+saved_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $FONTCONFIG_CFLAGS"
+AC_CHECK_HEADERS(fontconfig/fontconfig.h)
+
+case "$ac_cv_header_fontconfig_fontconfig_h" in
+no)
+ CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
+ ;;
+yes)
+ AC_CHECK_FUNCS(FcInit)
+ case "$ac_cv_func_FcInit" in
+ no)
+ CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
+ ;;
+ yes)
+ AC_DEFINE(HAVE_FONTCONFIG)
+ AC_SUBST(FONTCONFIG_CFLAGS)
+ AC_SUBST(FONTCONFIG_LIBS)
+ ;;
+ esac
+ ;;
+esac
+
+dnl
+dnl Should this be conditionally defined ?
+dnl
+if test "$HAVEXRENDER" = "yes" -a "$HAVEFREETYPE" = "yes"
+then
+ AC_DEFINE(USE_XFT)
+fi
+])
Index: lesstif2-0.95.0/ac_have_libxp.m4
===================================================================
--- lesstif2-0.95.0.orig/ac_have_libxp.m4 2004-02-01 16:49:40.000000000 +0100
+++ lesstif2-0.95.0/ac_have_libxp.m4 2006-07-11 11:11:36.000000000 +0200
@@ -11,6 +11,52 @@
dnl Makefiles. Perhaps one should immediately add those libs
dnl to link commands which include libXm version2.1?!
dnl
+AC_DEFUN(LT_HAVE_LIBXP,
+[AC_REQUIRE([AC_PATH_X])
+AC_CACHE_CHECK(whether libXp is available, lt_cv_libxp,
+[lt_save_CFLAGS="$CFLAGS"
+lt_save_CPPFLAGS="$CPPFLAGS"
+lt_save_LIBS="$LIBS"
+LIBS="$X_LIBS -lXp -lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
+CFLAGS="$X_CFLAGS $CFLAGS"
+CPPFLAGS="$X_CFLAGS $CPPFLAGS"
+AC_TRY_LINK([
+#include <X11/Intrinsic.h>
+#include <X11/extensions/Print.h>
+],[
+Display *display=NULL;
+short major_version, minor_version;
+Status rc;
+rc=XpQueryVersion(display, &major_version, &minor_version);
+],
+lt_cv_libxp=yes,
+lt_cv_libxp=no)
+])
+if test $lt_cv_libxp = yes; then
+ AC_DEFINE(HAVE_LIB_XP)
+ LT_HAVELIBXP=1
+else
+ LT_HAVELIBXP=0
+fi
+AM_CONDITIONAL(Have_Libxp, test "$lt_cv_libxp" = "yes")
+AC_SUBST(LT_HAVELIBXP)
+CFLAGS="$lt_save_CFLAGS"
+CPPFLAGS="$lt_save_CPPFLAGS"
+LIBS="$lt_save_LIBS"
+])
+dnl
+dnl Check for libXp
+dnl In fact this check ensures that
+dnl - <X11/extensions/Print.h> and
+dnl - both libXp and libXext
+dnl are in place
+dnl Perhaps AC_CHECK_LIB() could be used as well, but
+dnl requires the same amount of work to get all linker
+dnl flags and additional libraries specified.
+dnl If the test succeeds 'Have_Libxp' will be defined within our
+dnl Makefiles. Perhaps one should immediately add those libs
+dnl to link commands which include libXm version2.1?!
+dnl
AC_DEFUN([LT_HAVE_LIBXP],
[AC_REQUIRE([AC_PATH_X])
AC_CACHE_CHECK(whether libXp is available, lt_cv_libxp,
|