summaryrefslogtreecommitdiff
path: root/nonworking/glib-1.2/glib-1.2-1.2.10/configure.patch
blob: aac18a7f18e68925f436c109efc8051f01d41bd9 (plain)
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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
--- tmp/base/glib-1.2.10-r0/glib-1.2.10/Makefile.am	Fri Oct 27 23:35:30 2000
+++ glib-1.2.10/Makefile.am	Thu Oct 30 17:06:24 2003
@@ -70,7 +70,7 @@
 
 CONFIGURE_DEPENDENCIES = acglib.m4		
 
-BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
+BUILT_SOURCES += stamp-gc-h #note: not glibconfig.h
 glibconfig.h: stamp-gc-h
 	@:
 stamp-gc-h: config.status
--- tmp/base/glib-1.2.10-r0/glib-1.2.10/configure.in	Thu Mar 15 09:37:37 2001
+++ glib-1.2.10/configure.in	Thu Oct 30 17:07:57 2003
@@ -1,10 +1,11 @@
 dnl ***********************************
 dnl *** include special GLib macros ***
 dnl ***********************************
-builtin(include, acglib.m4)dnl
+dnl no need, just use aclocal -I . --CL
+dnl builtin(include, acglib.m4)dnl
 
 # require autoconf 2.13
-AC_PREREQ(2.13)
+AC_PREREQ(2.53)
 
 # init autoconf (and check for presence of glist.c)
 AC_INIT(glist.c)
@@ -13,11 +14,48 @@
 cflags_set=${CFLAGS+set}
 
 # we rewrite this file
+if test "x$cross_compiling" != "xyes"; then
 rm -f glibconfig-sysdefs.h
+fi
+
+# config defines
+
+AH_TEMPLATE([ENABLE_MEM_CHECK],
+	    [Define if enabling memory checking])
+AH_TEMPLATE([ENABLE_MEM_PROFILE], [])
+AH_TEMPLATE([GLIB_BINARY_AGE], [])
+AH_TEMPLATE([GLIB_BYTE_CONTENTS_GMUTEX], [])
+AH_TEMPLATE([GLIB_INTERFACE_AGE], [])
+AH_TEMPLATE([GLIB_MAJOR_VERSION], [])
+AH_TEMPLATE([GLIB_MINOR_VERSION], [])
+AH_TEMPLATE([GLIB_MICRO_VERSION], [])
+AH_TEMPLATE([GLIB_SIZEOF_GMUTEX], [])
+AH_TEMPLATE([G_COMPILED_WITH_DEBUGGING], [])
+AH_TEMPLATE([G_HAVE_INLINE], [])
+AH_TEMPLATE([G_HAVE___INLINE], [])
+AH_TEMPLATE([G_HAVE___INLINE__], [])
+AH_TEMPLATE([G_THREAD_SOURCE], [])
+AH_TEMPLATE([G_VA_COPY], [])
+AH_TEMPLATE([G_VA_COPY_AS_ARRAY], [])
+AH_TEMPLATE([HAVE_BROKEN_WCTYPE], [])
+AH_TEMPLATE([HAVE_GETPWUID_R], [])
+AH_TEMPLATE([HAVE_GETPWUID_R_POSIX], [])
+AH_TEMPLATE([HAVE_PTHREAD_COND_TIMEDWAIT_POSIX], [])
+AH_TEMPLATE([HAVE_PTHREAD_GETSPECIFIC_POSIX], [])
+AH_TEMPLATE([HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX], [])
+AH_TEMPLATE([HAVE_WCHAR_H], [])
+AH_TEMPLATE([HAVE_WCTYPE_H], [])
+AH_TEMPLATE([NO_FD_SET], [])
+AH_TEMPLATE([NO_SYS_ERRLIST], [])
+AH_TEMPLATE([NO_SYS_SIGLIST], [])
+AH_TEMPLATE([NO_SYS_SIGLIST_DECL], [])
+AH_TEMPLATE([REALLOC_0_WORKS], [])
+
 
 dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
-AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)
+#dnl
 #
 # The following version number definitions apply to GLib, GModule and GThread
 # as a whole, so if changes occoured in any of them, they are all
@@ -38,7 +76,7 @@
 GLIB_BINARY_AGE=10
 GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
 dnl
-AC_DIVERT_POP()dnl
+#AC_DIVERT_POP()dnl
 
 AC_SUBST(GLIB_MAJOR_VERSION)
 AC_SUBST(GLIB_MINOR_VERSION)
@@ -77,17 +115,15 @@
 dnl Initialize maintainer mode
 AM_MAINTAINER_MODE
 
-AC_CANONICAL_HOST
-
 dnl figure debugging default, prior to $ac_help setup
 dnl
-AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
 if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then
 	debug_default=yes
 else
 	debug_default=minimum
 fi
-AC_DIVERT_POP()dnl
+#AC_DIVERT_POP()dnl
 
 dnl declare --enable-* args and collect ac_help strings
 AC_ARG_ENABLE(debug, [  --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
@@ -194,7 +230,9 @@
          CFLAGS=$glib_save_CFLAGS
          AC_MSG_WARN(
                 [No ANSI prototypes found in library. (-std1 didn't work.)])
+	, AC_MSG_WARN([Skipping test due to crosscompilation])
      )
+     , AC_MSG_WARN([Skipping test due to crosscompilation])
 )
 LIBS=$glib_save_LIBS
 
@@ -405,11 +443,13 @@
 	  return realloc (0, sizeof (int)) == 0;
 	}],
 	glib_cv_sane_realloc=yes
-	AC_DEFINE(REALLOC_0_WORKS)
 	,
 	glib_cv_sane_realloc=no
 	,)
 ])
+if test "x$glib_cv_sane_realloc" = "xyes"; then
+	AC_DEFINE(REALLOC_0_WORKS)
+fi
 AC_MSG_RESULT($glib_cv_sane_realloc)
 
 
@@ -485,7 +525,8 @@
 ])
 if test "x$glib_cv_va_copy" = "xyes"; then
   AC_DEFINE(G_VA_COPY, va_copy)
-else if test "x$glib_cv___va_copy" = "xyes"; then
+else
+if test "x$glib_cv___va_copy" = "xyes"; then
   AC_DEFINE(G_VA_COPY, __va_copy)
 fi
 fi
@@ -494,6 +535,7 @@
 fi
 AC_MSG_RESULT($glib_cv_va_val_copy)
 
+AC_MSG_WARN([hi mom])
 
 dnl ***********************
 dnl *** g_module checks ***
@@ -505,21 +547,27 @@
 G_MODULE_BROKEN_RTLD_GLOBAL=0
 G_MODULE_HAVE_DLERROR=0
 dnl *** dlopen() and dlsym() in system libraries
+AC_CHECK_FUNC(dlopen,[
+	AC_CHECK_FUNC(dlsym,[
+		G_MODULE_IMPL=G_MODULE_IMPL_DL
+		],
+	)],
+)
 if test -z "$G_MODULE_IMPL"; then
-	AC_CHECK_FUNC(dlopen,
-		AC_CHECK_FUNC(dlsym,
+	AC_CHECK_FUNC(dlopen,[
+		AC_CHECK_FUNC(dlsym,[
 			G_MODULE_IMPL=G_MODULE_IMPL_DL
-		,)
-	,)
+		])],
+	)
 fi
 dnl *** dlopen() and dlsym() in libdl
 if test -z "$G_MODULE_IMPL"; then
-	AC_CHECK_LIB(dl, dlopen,
-		AC_CHECK_LIB(dl, dlsym,
+	AC_CHECK_LIB(dl, dlopen,[
+		AC_CHECK_LIB(dl, dlsym,[
 			G_MODULE_LIBS=-ldl
 			G_MODULE_IMPL=G_MODULE_IMPL_DL
-		,)
-	,)
+		])]
+	)
 fi
 dnl *** shl_load() in libdld (HP-UX)
 if test -z "$G_MODULE_IMPL"; then
@@ -629,6 +677,7 @@
 AC_SUBST(G_MODULE_NEED_USCORE)
 AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
 AC_SUBST(GLIB_DEBUG_FLAGS)
+AC_MSG_WARN([hi mom])
 
 
 dnl ***********************
@@ -865,38 +914,50 @@
 	fi
 	if test x"$have_threads" = xposix; then
 		LIBS="$LIBS $G_THREAD_LIBS"
-		AC_MSG_CHECKING(whether pthread_getspecific is posix like)
 		# PCThreads has pthread_getspecific(pthread_key_t, void **);
-		AC_TRY_COMPILE([#include <pthread.h>],
-			[pthread_getspecific(0,NULL);],
-			[AC_MSG_RESULT(no)],
-			[AC_MSG_RESULT(yes)
-			AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
-		AC_MSG_CHECKING(whether pthread_mutex_trylock is posix like)
+		AC_CACHE_CHECK([whether pthread_getspecific is posix like],
+			[glib_cv_sys_pthread_getspecific_posix], 
+			AC_TRY_COMPILE([#include <pthread.h>],
+				[pthread_getspecific(0,NULL);],
+				[glib_cv_sys_pthread_getspecific_posix=no],
+				[glib_cv_sys_pthread_getspecific_posix=yes])
+		)
+		if test x"$glib_cv_sys_pthread_getspecific_posix" = xyes; then
+			AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)
+		fi
 		# DCE Threads return 1 as success, posix 0. what a mess.
-		AC_TRY_RUN([#include <pthread.h>
-			pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-			int main () { 
-			return !pthread_mutex_trylock (&mutex); }],
-			[AC_MSG_RESULT(no)],
-			[AC_MSG_RESULT(yes)
-			AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
-		AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
+		AC_CACHE_CHECK([whether pthread_mutex_trylock is posix like],
+			[glib_cv_sys_pthread_mutex_trylock_posix], 
+			AC_TRY_RUN([#include <pthread.h>
+				pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+				int main () { 
+				return !pthread_mutex_trylock (&mutex); }],
+				[glib_cv_sys_pthread_mutex_trylock_posix=no],
+				[glib_cv_sys_pthread_mutex_trylock_posix=yes])
+		)
+		if test x"$glib_cv_sys_pthread_mutex_trylock_posix" = xyes; then
+			AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)
+		fi
 		# DCE Threads return -1 as failure, posix ETIMEDOUT.
-		AC_TRY_RUN([#include <pthread.h>
-			int main () { 
-			pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-			pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
-			struct timeval tval;
-			struct timespec tspec;
-			gettimeofday (&tval, NULL);
-			tspec.tv_sec = tval.tv_sec;
-			tspec.tv_nsec = 0;
-			return pthread_cond_timedwait (&cond,&mutex,&tspec) 
-				!= -1;}],
-			[AC_MSG_RESULT(no)],
-			[AC_MSG_RESULT(yes)
-			AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
+		AC_CACHE_CHECK([whether pthread_cond_timedwait is posix like],
+			[glib_cv_sys_pthread_cond_timedwait_posix], 
+			AC_TRY_RUN([#include <pthread.h>
+				int main () { 
+				pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+				pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
+				struct timeval tval;
+				struct timespec tspec;
+				gettimeofday (&tval, NULL);
+				tspec.tv_sec = tval.tv_sec;
+				tspec.tv_nsec = 0;
+				return pthread_cond_timedwait (&cond,&mutex,&tspec) 
+					!= -1;}],
+				[glib_cv_sys_pthread_cond_timedwait_posix=no],
+				[glib_cv_sys_pthread_cond_timedwait_posix=yes])
+		)
+		if test x"$glib_cv_sys_pthread_cond_timedwait_posix" = xyes; then
+			AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)
+		fi
 	fi
 	LIBS="$glib_save_LIBS"
 	CFLAGS="$glib_save_CFLAGS"
@@ -940,13 +1001,14 @@
 dnl ****************************************
 dnl *** GLib POLL* compatibility defines ***
 dnl ****************************************
+if test x"$cross_compiling" != xyes; then
 GLIB_SYSDEFS(
 [#include <sys/types.h>
 #include <sys/poll.h>],
 	POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
 	glibconfig-sysdefs.h,
 	=)
-
+fi
 
 dnl ******************************
 dnl *** output the whole stuff ***
@@ -972,16 +1034,16 @@
 *glibconfig.h*)
 	echo creating glibconfig.h
 	outfile=glibconfig.h-tmp
-	cat > $outfile <<\_______EOF
+	cat > $outfile <<EOF
 /* glibconfig.h
  *
- * This is a generated file.  Please modify `configure.in'
+ * This is a generated file.  Please modify 'configure.in'
  */
 
 #ifndef GLIBCONFIG_H
 #define GLIBCONFIG_H
 
-_______EOF
+EOF
 
 	if test x$glib_limits_h = xyes; then
 	  echo '#include <limits.h>' >> $outfile
@@ -999,7 +1061,7 @@
 	  echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
 	fi
 
-	cat >> $outfile <<_______EOF
+	cat >> $outfile <<EOF
 
 #ifdef __cplusplus
 extern "C" {
@@ -1016,60 +1078,60 @@
 #define G_MINLONG	$glib_ml
 #define G_MAXLONG	$glib_Ml
 
-_______EOF
+EOF
 
 
 	### this should always be true in a modern C/C++ compiler
-	cat >>$outfile <<_______EOF
+	cat >>$outfile <<EOF
 typedef signed char gint8;
 typedef unsigned char guint8;
-_______EOF
+EOF
 
 
 	if test -n "$gint16"; then
-	  cat >>$outfile <<_______EOF
+	  cat >>$outfile <<EOF
 typedef signed $gint16 gint16;
 typedef unsigned $gint16 guint16;
-_______EOF
+EOF
 	fi
 
 
 	if test -n "$gint32"; then
-	  cat >>$outfile <<_______EOF
+	  cat >>$outfile <<EOF
 typedef signed $gint32 gint32;
 typedef unsigned $gint32 guint32;
-_______EOF
+EOF
 	fi
 
 
 	if test -n "$gint64"; then
-	  cat >>$outfile <<_______EOF
+	  cat >>$outfile <<EOF
 ${glib_warning_guard}#define G_HAVE_GINT64 1
 
 ${glib_extension}typedef signed $gint64 gint64;
 ${glib_extension}typedef unsigned $gint64 guint64;
 
 #define G_GINT64_CONSTANT(val)	$gint64_constant
-_______EOF
+EOF
 	fi
 
 
 	if test -z "$glib_unknown_void_p"; then
-	  cat >>$outfile <<_______EOF
+	  cat >>$outfile <<EOF
 
 #define GPOINTER_TO_INT(p)	((gint)  ${glib_gpi_cast} (p))
 #define GPOINTER_TO_UINT(p)	((guint) ${glib_gpui_cast} (p))
 
 #define GINT_TO_POINTER(i)	((gpointer) ${glib_gpi_cast} (i))
 #define GUINT_TO_POINTER(u)	((gpointer) ${glib_gpui_cast} (u))
-_______EOF
+EOF
 	else
 	  echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
 	fi
 
 
 
-	cat >>$outfile <<_______EOF
+	cat >>$outfile <<EOF
 $glib_atexit
 $glib_memmove
 $glib_defines
@@ -1081,11 +1143,11 @@
 #else	/* !__cplusplus */
 $glib_inline
 #endif	/* !__cplusplus */
-_______EOF
+EOF
 
 	echo >>$outfile
 	if test x$g_mutex_has_default = xyes; then
-		cat >>$outfile <<_______EOF
+		cat >>$outfile <<EOF
 $g_enable_threads_def G_THREADS_ENABLED
 #define G_THREADS_IMPL_$g_threads_impl_def
 typedef struct _GStaticMutex GStaticMutex;
@@ -1103,15 +1165,15 @@
 #define	g_static_mutex_get_mutex(mutex) \
   (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
    g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
-_______EOF
+EOF
 	else
-		cat >>$outfile <<_______EOF
+		cat >>$outfile <<EOF
 $g_enable_threads_def G_THREADS_ENABLED
 #define G_THREADS_IMPL_$g_threads_impl_def
 typedef struct _GMutex* GStaticMutex;
 #define G_STATIC_MUTEX_INIT NULL
 #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
-_______EOF
+EOF
 	fi
 
 	echo >>$outfile
@@ -1120,15 +1182,15 @@
 	  g_bit_sizes="$g_bit_sizes 64"
 	fi
 	for bits in $g_bit_sizes; do
-	  cat >>$outfile <<_______EOF
+	  cat >>$outfile <<EOF
 #define GINT${bits}_TO_${g_bs_native}(val)	((gint${bits}) (val))
 #define GUINT${bits}_TO_${g_bs_native}(val)	((guint${bits}) (val))
 #define GINT${bits}_TO_${g_bs_alien}(val)	((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
 #define GUINT${bits}_TO_${g_bs_alien}(val)	(GUINT${bits}_SWAP_LE_BE (val))
-_______EOF
+EOF
 	done
 
-	cat >>$outfile <<_______EOF
+	cat >>$outfile <<EOF
 #define GLONG_TO_LE(val)	((glong) GINT${glongbits}_TO_LE (val))
 #define GULONG_TO_LE(val)	((gulong) GUINT${glongbits}_TO_LE (val))
 #define GLONG_TO_BE(val)	((glong) GINT${glongbits}_TO_BE (val))
@@ -1139,14 +1201,14 @@
 #define GUINT_TO_BE(val)	((guint) GUINT${gintbits}_TO_BE (val))
 #define G_BYTE_ORDER $g_byte_order
 
-_______EOF
+EOF
 
 	if test -r glibconfig-sysdefs.h; then
 	  cat glibconfig-sysdefs.h >>$outfile
 	fi
 
 
-	cat >>$outfile <<_______EOF
+	cat >>$outfile <<EOF
 
 $glib_wc
 
@@ -1156,7 +1218,7 @@
 #endif /* __cplusplus */
 
 #endif /* GLIBCONFIG_H */
-_______EOF
+EOF
 
 
 	if cmp -s $outfile glibconfig.h; then
--- tmp/base/glib-1.2.10-r0/glib-1.2.10/gmodule/Makefile.am	Thu Mar 15 09:33:10 2001
+++ glib-1.2.10/gmodule/Makefile.am	Thu Oct 30 17:06:09 2003
@@ -42,7 +42,7 @@
 libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ # $(libglib)
 
 noinst_PROGRAMS = testgmodule
-testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
+testgmodule_LDFLAGS = @G_MODULE_LDFLAGS@
 testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@
 
 .PHONY: files release