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
|
--- configure.orig Wed Feb 17 04:14:07 1999
+++ configure Wed Feb 17 21:11:29 1999
@@ -3758,7 +3758,7 @@
# Check for some functions
-for ac_func in lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp poll
+for ac_func in lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3765: checking for $ac_func" >&5
@@ -5302,11 +5302,13 @@
G_THREAD_CFLAGS="$G_THREAD_CFLAGS -mthreads"
fi
;;
- *-freebsd2.2*)
- G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE"
-
- # FreeBSD 2.2.x shiped with gcc 2.7.2.x, which doesn't support
- # -mthreads flag.
+ *-*-freebsd2.2* | *-*-freebsd3* | *-*-freebsd4*)
+ if test x"$G_THREAD_LIBS" = x"-lc_r"; then
+ G_THREAD_CFLAGS="-D_THREAD_SAFE -pthread"
+ have_poll=no
+ else
+ G_THREAD_CFLAGS="-D_THREAD_SAFE"
+ fi
;;
esac
@@ -5315,7 +5317,7 @@
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 5319 "configure"
+#line 5321 "configure"
#include "confdefs.h"
#include <time.h>
EOF
@@ -5332,7 +5334,7 @@
CPPFLAGS=$old_CPPFLAGS
echo $ac_n "checking necessary compiler options""... $ac_c" 1>&6
-echo "configure:5336: checking necessary compiler options" >&5
+echo "configure:5338: checking necessary compiler options" >&5
echo "$ac_t""$G_THREAD_CFLAGS" 1>&6
else
@@ -5350,12 +5352,12 @@
for ac_func in localtime_r rand_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5354: checking for $ac_func" >&5
+echo "configure:5356: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5359 "configure"
+#line 5361 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5378,7 +5380,7 @@
; return 0; }
EOF
-if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5404,7 +5406,7 @@
if test "$ac_cv_header_pwd_h" = "yes"; then
echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6
-echo "configure:5408: checking for getpwuid_r" >&5
+echo "configure:5410: checking for getpwuid_r" >&5
if eval "test \"`echo '$''{'ac_cv_func_getpwuid_r'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5412,7 +5414,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 5416 "configure"
+#line 5418 "configure"
#include "confdefs.h"
#include <errno.h>
int main () { char buffer[10000], *pointer;
@@ -5423,7 +5425,7 @@
sizeof (buffer), &pointer);
return errno == ENOSYS;}
EOF
-if { (eval echo configure:5427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_getpwuid_r=yes
else
@@ -5448,20 +5450,20 @@
fi
if test "$ac_cv_func_getpwuid_r" = "yes"; then
echo $ac_n "checking whether getpwuid_r is posix like""... $ac_c" 1>&6
-echo "configure:5452: checking whether getpwuid_r is posix like" >&5
+echo "configure:5454: checking whether getpwuid_r is posix like" >&5
# getpwuid_r(0, NULL, NULL, 0) is the signature on
# solaris, if that is not found, the prog below won't
# compile, then the posix signature is assumed as
# the default.
cat > conftest.$ac_ext <<EOF
-#line 5458 "configure"
+#line 5460 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
getpwuid_r(0, NULL, NULL, 0);
; return 0; }
EOF
-if { (eval echo configure:5465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""no" 1>&6
else
@@ -5479,17 +5481,17 @@
fi
if test x"$have_threads" = xposix; then
echo $ac_n "checking whether pthread_getspecific is posix like""... $ac_c" 1>&6
-echo "configure:5483: checking whether pthread_getspecific is posix like" >&5
+echo "configure:5485: checking whether pthread_getspecific is posix like" >&5
# PCThreads has pthread_getspecific(pthread_key_t, void **);
cat > conftest.$ac_ext <<EOF
-#line 5486 "configure"
+#line 5488 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
pthread_getspecific(0,NULL);
; return 0; }
EOF
-if { (eval echo configure:5493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""no" 1>&6
else
@@ -5530,7 +5532,7 @@
case "$mutex_has_default" in
"yes")
echo $ac_n "checking size of $mutex_default_type""... $ac_c" 1>&6
-echo "configure:5534: checking size of $mutex_default_type" >&5
+echo "configure:5536: checking size of $mutex_default_type" >&5
if eval "test \"`echo '$''{'glib_cv_sizeof_gmutex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5538,7 +5540,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 5542 "configure"
+#line 5544 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <$mutex_header_file>
@@ -5550,7 +5552,7 @@
exit(0);
}
EOF
-if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
glib_cv_sizeof_gmutex=`cat conftestval`
else
@@ -5570,7 +5572,7 @@
echo $ac_n "checking byte contents of $mutex_default_type""... $ac_c" 1>&6
-echo "configure:5574: checking byte contents of $mutex_default_type" >&5
+echo "configure:5576: checking byte contents of $mutex_default_type" >&5
if eval "test \"`echo '$''{'glib_cv_byte_contents_gmutex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5578,7 +5580,7 @@
glib_cv_byte_contents_gmutex=0
else
cat > conftest.$ac_ext <<EOF
-#line 5582 "configure"
+#line 5584 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <$mutex_header_file>
@@ -5595,7 +5597,7 @@
exit(0);
}
EOF
-if { (eval echo configure:5599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
glib_cv_byte_contents_gmutex=`cat conftestval`
else
@@ -5623,6 +5625,63 @@
+if test x"$have_poll" != xno; then
+ for ac_func in poll
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5633: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5638 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
glib_sysdefso="glibconfig-sysdefs.h"
glib_sysdef_msg=`echo POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32 | sed 's/:[^ ]*//g'`
if test "x`(echo '\n') 2>/dev/null`" != 'x\n'; then
@@ -5631,7 +5690,7 @@
glib_nl='\n'
fi
echo $ac_n "checking system definitions for $glib_sysdef_msg""... $ac_c" 1>&6
-echo "configure:5635: checking system definitions for $glib_sysdef_msg" >&5
+echo "configure:5694: checking system definitions for $glib_sysdef_msg" >&5
cat >confrun.c <<_______EOF
#include <stdio.h>
#include <sys/types.h>
@@ -5658,11 +5717,11 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 5662 "configure"
+#line 5721 "configure"
#include "confdefs.h"
`cat confrun.c`
EOF
-if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""done" 1>&6
else
|