Lines 9-23
Link Here
|
9 |
# init autoconf (and check for presence of glist.c) |
9 |
# init autoconf (and check for presence of glist.c) |
10 |
AC_INIT(glist.c) |
10 |
AC_INIT(glist.c) |
11 |
|
11 |
|
|
|
12 |
AC_CANONICAL_TARGET |
12 |
# Save this value here, since automake will set cflags later |
13 |
# Save this value here, since automake will set cflags later |
13 |
cflags_set=${CFLAGS+set} |
14 |
cflags_set=${CFLAGS+set} |
14 |
|
15 |
|
15 |
# we rewrite this file |
16 |
# we rewrite this file |
16 |
rm -f glibconfig-sysdefs.h |
17 |
rm -f glibconfig-sysdefs.h |
17 |
|
18 |
|
18 |
dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they |
19 |
GLIB_AC_DIVERT_BEFORE_HELP([ |
19 |
dnl are available for $ac_help expansion (don't we all *love* autoconf?) |
|
|
20 |
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl |
21 |
# |
20 |
# |
22 |
# The following version number definitions apply to GLib, GModule and GThread |
21 |
# The following version number definitions apply to GLib, GModule and GThread |
23 |
# as a whole, so if changes occoured in any of them, they are all |
22 |
# as a whole, so if changes occoured in any of them, they are all |
Lines 36-44
Link Here
|
36 |
GLIB_MICRO_VERSION=10 |
35 |
GLIB_MICRO_VERSION=10 |
37 |
GLIB_INTERFACE_AGE=10 |
36 |
GLIB_INTERFACE_AGE=10 |
38 |
GLIB_BINARY_AGE=10 |
37 |
GLIB_BINARY_AGE=10 |
39 |
GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION |
38 |
GLIB_VERSION="$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION" |
40 |
dnl |
39 |
]) |
41 |
AC_DIVERT_POP()dnl |
|
|
42 |
|
40 |
|
43 |
AC_SUBST(GLIB_MAJOR_VERSION) |
41 |
AC_SUBST(GLIB_MAJOR_VERSION) |
44 |
AC_SUBST(GLIB_MINOR_VERSION) |
42 |
AC_SUBST(GLIB_MINOR_VERSION) |
Lines 48-64
Link Here
|
48 |
AC_SUBST(GLIB_BINARY_AGE) |
46 |
AC_SUBST(GLIB_BINARY_AGE) |
49 |
|
47 |
|
50 |
# libtool versioning |
48 |
# libtool versioning |
51 |
LT_RELEASE=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION |
49 |
LT_RELEASE="$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION" |
52 |
LT_CURRENT=`expr $GLIB_MICRO_VERSION - $GLIB_INTERFACE_AGE` |
50 |
LT_CURRENT=`expr $GLIB_MICRO_VERSION - $GLIB_INTERFACE_AGE` |
53 |
LT_REVISION=$GLIB_INTERFACE_AGE |
51 |
LT_REVISION="$GLIB_INTERFACE_AGE" |
54 |
LT_AGE=`expr $GLIB_BINARY_AGE - $GLIB_INTERFACE_AGE` |
52 |
LT_AGE=`expr $GLIB_BINARY_AGE - $GLIB_INTERFACE_AGE` |
55 |
AC_SUBST(LT_RELEASE) |
53 |
AC_SUBST(LT_RELEASE) |
56 |
AC_SUBST(LT_CURRENT) |
54 |
AC_SUBST(LT_CURRENT) |
57 |
AC_SUBST(LT_REVISION) |
55 |
AC_SUBST(LT_REVISION) |
58 |
AC_SUBST(LT_AGE) |
56 |
AC_SUBST(LT_AGE) |
59 |
|
57 |
|
60 |
VERSION=$GLIB_VERSION |
58 |
VERSION="$GLIB_VERSION" |
61 |
PACKAGE=glib |
59 |
PACKAGE="glib" |
62 |
|
60 |
|
63 |
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) |
61 |
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) |
64 |
|
62 |
|
Lines 72-115
Link Here
|
72 |
AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE) |
70 |
AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE) |
73 |
|
71 |
|
74 |
dnl Initialize libtool |
72 |
dnl Initialize libtool |
75 |
AM_PROG_LIBTOOL |
73 |
AC_PROG_LIBTOOL |
76 |
|
74 |
|
77 |
dnl Initialize maintainer mode |
75 |
dnl Initialize maintainer mode |
78 |
AM_MAINTAINER_MODE |
76 |
AM_MAINTAINER_MODE |
79 |
|
77 |
|
80 |
AC_CANONICAL_HOST |
|
|
81 |
|
78 |
|
82 |
dnl figure debugging default, prior to $ac_help setup |
79 |
dnl figure debugging default, prior to $ac_help setup |
83 |
dnl |
80 |
dnl |
84 |
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl |
81 |
GLIB_AC_DIVERT_BEFORE_HELP([ |
85 |
if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then |
82 |
if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then |
86 |
debug_default=yes |
83 |
debug_default="yes" |
87 |
else |
84 |
else |
88 |
debug_default=minimum |
85 |
debug_default="minimum" |
89 |
fi |
86 |
fi |
90 |
AC_DIVERT_POP()dnl |
87 |
]) |
91 |
|
|
|
92 |
dnl declare --enable-* args and collect ac_help strings |
88 |
dnl declare --enable-* args and collect ac_help strings |
93 |
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default) |
89 |
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],, |
94 |
AC_ARG_ENABLE(mem_check, [ --enable-mem-check turn on malloc/free sanity checking (not recommended) [default=no]],,enable_mem_check=no) |
90 |
enable_debug="$debug_default") |
95 |
AC_ARG_ENABLE(mem_profile, [ --enable-mem-profile turn on malloc profiling atexit (not recommended) [default=no]],,enable_mem_profile=no) |
91 |
AC_ARG_ENABLE(mem_check, [ --enable-mem-check turn on malloc/free sanity checking (not recommended) [default=no]],, |
96 |
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]], |
92 |
enable_mem_check="no") |
97 |
, enable_ansi=no) |
93 |
AC_ARG_ENABLE(mem_profile, [ --enable-mem-profile turn on malloc profiling atexit (not recommended) [default=no]],, |
|
|
94 |
enable_mem_profile="no") |
95 |
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],,enable_ansi="no") |
98 |
AC_ARG_ENABLE(threads, [ --enable-threads turn on basic thread support [default=yes] |
96 |
AC_ARG_ENABLE(threads, [ --enable-threads turn on basic thread support [default=yes] |
99 |
([=no] will override --with-threads)],,enable_threads=yes) |
97 |
([=no] will override --with-threads)],,enable_threads="yes") |
100 |
|
98 |
|
101 |
if test "x$enable_threads" != "xyes"; then |
99 |
if test "x$enable_threads" != "xyes"; then |
102 |
enable_threads=no |
100 |
enable_threads="no" |
103 |
fi |
101 |
fi |
104 |
|
102 |
|
105 |
mem_warn=false |
103 |
mem_warn="false" |
106 |
|
104 |
|
107 |
AC_MSG_CHECKING(whether to enable memory checking) |
105 |
AC_MSG_CHECKING(whether to enable memory checking) |
108 |
if test "x$enable_mem_check" = "xyes"; then |
106 |
if test "x$enable_mem_check" = "xyes"; then |
109 |
AC_DEFINE(ENABLE_MEM_CHECK, 1) |
107 |
AC_DEFINE(ENABLE_MEM_CHECK, 1) |
110 |
AC_SUBST(ENABLE_MEM_CHECK) |
108 |
AC_SUBST(ENABLE_MEM_CHECK) |
111 |
AC_MSG_RESULT(yes) |
109 |
AC_MSG_RESULT(yes) |
112 |
mem_warn=true |
110 |
mem_warn="true" |
113 |
else |
111 |
else |
114 |
AC_MSG_RESULT(no) |
112 |
AC_MSG_RESULT(no) |
115 |
fi |
113 |
fi |
Lines 119-132
Link Here
|
119 |
AC_DEFINE(ENABLE_MEM_PROFILE, 1) |
117 |
AC_DEFINE(ENABLE_MEM_PROFILE, 1) |
120 |
AC_SUBST(ENABLE_MEM_PROFILE) |
118 |
AC_SUBST(ENABLE_MEM_PROFILE) |
121 |
AC_MSG_RESULT(yes) |
119 |
AC_MSG_RESULT(yes) |
122 |
mem_warn=true |
120 |
mem_warn="true" |
123 |
else |
121 |
else |
124 |
AC_MSG_RESULT(no) |
122 |
AC_MSG_RESULT(no) |
125 |
fi |
123 |
fi |
126 |
|
124 |
|
127 |
|
125 |
if test "$mem_warn" = "true"; then |
128 |
|
|
|
129 |
if $mem_warn ; then |
130 |
AC_MSG_WARN([ |
126 |
AC_MSG_WARN([ |
131 |
********************************************************************** |
127 |
********************************************************************** |
132 |
You have specified --enable-mem-profile or --enable-mem-check. |
128 |
You have specified --enable-mem-profile or --enable-mem-check. |
Lines 142-148
Link Here
|
142 |
fi |
138 |
fi |
143 |
|
139 |
|
144 |
if test "x$enable_debug" = "xyes"; then |
140 |
if test "x$enable_debug" = "xyes"; then |
145 |
test "$cflags_set" = set || CFLAGS="$CFLAGS -g" |
141 |
test "$cflags_set" = "set" || CFLAGS="$CFLAGS -g" |
146 |
GLIB_DEBUG_FLAGS="-DG_ENABLE_DEBUG" |
142 |
GLIB_DEBUG_FLAGS="-DG_ENABLE_DEBUG" |
147 |
else |
143 |
else |
148 |
if test "x$enable_debug" = "xno"; then |
144 |
if test "x$enable_debug" = "xno"; then |
Lines 180-214
Link Here
|
180 |
|
176 |
|
181 |
dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R) |
177 |
dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R) |
182 |
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes]) |
178 |
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes]) |
183 |
glib_save_LIBS=$LIBS |
179 |
glib_save_LIBS="$LIBS" |
184 |
LIBS="$LIBS -lm" |
180 |
LIBS="$LIBS -lm" |
|
|
181 |
|
185 |
AC_TRY_RUN([#include <math.h> |
182 |
AC_TRY_RUN([#include <math.h> |
186 |
int main (void) { return (log(1) != log(1.)); }], |
183 |
int main (void) { return (log(1) != log(1.)); }], |
187 |
AC_MSG_RESULT(none needed), |
184 |
AC_MSG_RESULT(none needed), |
188 |
glib_save_CFLAGS=$CFLAGS |
185 |
glib_save_CFLAGS="$CFLAGS" |
189 |
CFLAGS="$CFLAGS -std1" |
186 |
CFLAGS="$CFLAGS -std1" |
190 |
AC_TRY_RUN([#include <math.h> |
187 |
[AC_TRY_RUN([#include <math.h> |
191 |
int main (void) { return (log(1) != log(1.)); }], |
188 |
int main (void) { return (log(1) != log(1.)); }], |
192 |
AC_MSG_RESULT(-std1), |
189 |
AC_MSG_RESULT(-std1), |
193 |
AC_MSG_RESULT() |
190 |
AC_MSG_RESULT() |
194 |
CFLAGS=$glib_save_CFLAGS |
191 |
CFLAGS="$glib_save_CFLAGS" |
195 |
AC_MSG_WARN( |
192 |
AC_MSG_WARN( |
196 |
[No ANSI prototypes found in library. (-std1 didn't work.)]) |
193 |
[No ANSI prototypes found in library. (-std1 didn't work.)]) |
|
|
194 |
)] |
197 |
) |
195 |
) |
198 |
) |
196 |
LIBS="$glib_save_LIBS" |
199 |
LIBS=$glib_save_LIBS |
|
|
200 |
|
197 |
|
201 |
dnl NeXTStep cc seems to need this |
198 |
dnl NeXTStep cc seems to need this |
202 |
AC_MSG_CHECKING([for extra flags for POSIX compliance]) |
199 |
AC_MSG_CHECKING([for extra flags for POSIX compliance]) |
203 |
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;], |
200 |
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;], |
204 |
AC_MSG_RESULT(none needed), |
201 |
AC_MSG_RESULT(none needed), |
205 |
glib_save_CFLAGS=$CFLAGS |
202 |
glib_save_CFLAGS="$CFLAGS" |
206 |
CFLAGS="$CFLAGS -posix" |
203 |
CFLAGS="$CFLAGS -posix" |
207 |
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;], |
204 |
[AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;], |
208 |
AC_MSG_RESULT(-posix), |
205 |
AC_MSG_RESULT(-posix), |
209 |
AC_MSG_RESULT() |
206 |
AC_MSG_RESULT() |
210 |
CFLAGS=$glib_save_CFLAGS |
207 |
CFLAGS="$glib_save_CFLAGS" |
211 |
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)]))) |
208 |
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)]) |
|
|
209 |
|
210 |
)] |
211 |
) |
212 |
|
212 |
|
213 |
# Checks for header files. |
213 |
# Checks for header files. |
214 |
AC_HEADER_STDC |
214 |
AC_HEADER_STDC |
Lines 233-280
Link Here
|
233 |
dnl truely know which ones of `inline', `__inline' and `__inline__' are |
233 |
dnl truely know which ones of `inline', `__inline' and `__inline__' are |
234 |
dnl actually supported. |
234 |
dnl actually supported. |
235 |
AC_MSG_CHECKING(for __inline) |
235 |
AC_MSG_CHECKING(for __inline) |
236 |
AC_CACHE_VAL(glib_cv_has__inline,[ |
236 |
AC_CACHE_VAL(glib_cv_has__inline, |
237 |
AC_TRY_RUN([ |
237 |
[AC_TRY_RUN([ |
238 |
__inline int foo () { return 0; } |
238 |
__inline int foo () { return 0; } |
239 |
int main () { return foo (); } |
239 |
int main () { return foo (); }], |
240 |
], |
240 |
glib_cv_has__inline="yes", |
241 |
glib_cv_has__inline=yes |
241 |
glib_cv_has__inline="no" |
242 |
, |
242 |
)] |
243 |
glib_cv_has__inline=no |
243 |
) |
244 |
,) |
|
|
245 |
]) |
246 |
AC_MSG_RESULT($glib_cv_has__inline) |
244 |
AC_MSG_RESULT($glib_cv_has__inline) |
247 |
case x$glib_cv_has__inline in |
245 |
|
|
|
246 |
case "x$glib_cv_has__inline" in |
248 |
xyes) AC_DEFINE(G_HAVE___INLINE) |
247 |
xyes) AC_DEFINE(G_HAVE___INLINE) |
249 |
esac |
248 |
esac |
|
|
249 |
|
250 |
AC_MSG_CHECKING(for __inline__) |
250 |
AC_MSG_CHECKING(for __inline__) |
251 |
AC_CACHE_VAL(glib_cv_has__inline__,[ |
251 |
AC_CACHE_VAL(glib_cv_has__inline__, |
252 |
AC_TRY_RUN([ |
252 |
[AC_TRY_RUN([ |
253 |
__inline__ int foo () { return 0; } |
253 |
__inline__ int foo () { return 0; } |
254 |
int main () { return foo (); } |
254 |
int main () { return foo (); }], |
255 |
], |
255 |
glib_cv_has__inline__="yes", |
256 |
glib_cv_has__inline__=yes |
256 |
glib_cv_has__inline__="no" |
257 |
, |
257 |
)] |
258 |
glib_cv_has__inline__=no |
258 |
) |
259 |
,) |
|
|
260 |
]) |
261 |
AC_MSG_RESULT($glib_cv_has__inline__) |
259 |
AC_MSG_RESULT($glib_cv_has__inline__) |
262 |
case x$glib_cv_has__inline__ in |
260 |
|
|
|
261 |
case "x$glib_cv_has__inline__" in |
263 |
xyes) AC_DEFINE(G_HAVE___INLINE__) |
262 |
xyes) AC_DEFINE(G_HAVE___INLINE__) |
264 |
esac |
263 |
esac |
|
|
264 |
|
265 |
AC_MSG_CHECKING(for inline) |
265 |
AC_MSG_CHECKING(for inline) |
266 |
AC_CACHE_VAL(glib_cv_hasinline,[ |
266 |
AC_CACHE_VAL(glib_cv_hasinline, |
267 |
AC_TRY_RUN([ |
267 |
[AC_TRY_RUN( |
268 |
inline int foo () { return 0; } |
268 |
[inline int foo () { return 0; } |
269 |
int main () { return foo (); } |
269 |
int main () { return foo (); }], |
270 |
], |
270 |
glib_cv_hasinline="yes", |
271 |
glib_cv_hasinline=yes |
271 |
glib_cv_hasinline="no" |
272 |
, |
272 |
)] |
273 |
glib_cv_hasinline=no |
273 |
) |
274 |
,) |
|
|
275 |
]) |
276 |
AC_MSG_RESULT($glib_cv_hasinline) |
274 |
AC_MSG_RESULT($glib_cv_hasinline) |
277 |
case x$glib_cv_hasinline in |
275 |
|
|
|
276 |
case "x$glib_cv_hasinline" in |
278 |
xyes) AC_DEFINE(G_HAVE_INLINE) |
277 |
xyes) AC_DEFINE(G_HAVE_INLINE) |
279 |
esac |
278 |
esac |
280 |
|
279 |
|
Lines 298-343
Link Here
|
298 |
|
297 |
|
299 |
# Check for sys_errlist |
298 |
# Check for sys_errlist |
300 |
AC_MSG_CHECKING(for sys_errlist) |
299 |
AC_MSG_CHECKING(for sys_errlist) |
301 |
AC_TRY_LINK(, [ |
300 |
AC_TRY_LINK(, |
302 |
extern char *sys_errlist[]; |
301 |
[extern char *sys_errlist[]; |
303 |
extern int sys_nerr; |
302 |
extern int sys_nerr; |
304 |
sys_errlist[sys_nerr-1][0] = 0; |
303 |
sys_errlist[sys_nerr-1][0] = 0;], |
305 |
], glib_ok=yes, glib_ok=no) |
304 |
glib_ok="yes", |
|
|
305 |
glib_ok="no") |
306 |
AC_MSG_RESULT($glib_ok) |
306 |
AC_MSG_RESULT($glib_ok) |
307 |
if test $glib_ok = no; then |
307 |
|
|
|
308 |
if test "$glib_ok" = "no"; then |
308 |
AC_DEFINE(NO_SYS_ERRLIST) |
309 |
AC_DEFINE(NO_SYS_ERRLIST) |
309 |
fi |
310 |
fi |
310 |
|
311 |
|
311 |
# Check for sys_siglist |
312 |
# Check for sys_siglist |
312 |
AC_MSG_CHECKING(for sys_siglist) |
313 |
AC_MSG_CHECKING(for sys_siglist) |
313 |
AC_TRY_LINK(, [ |
314 |
AC_TRY_LINK(, |
314 |
extern char *sys_siglist[]; |
315 |
[extern char *sys_siglist[]; |
315 |
exit (sys_siglist[0]); |
316 |
exit (sys_siglist[0]);], |
316 |
], glib_ok=yes, glib_ok=no) |
317 |
glib_ok="yes", |
|
|
318 |
glib_ok="no") |
317 |
AC_MSG_RESULT($glib_ok) |
319 |
AC_MSG_RESULT($glib_ok) |
318 |
if test $glib_ok = no; then |
320 |
|
|
|
321 |
if test "$glib_ok" = "no"; then |
319 |
AC_DEFINE(NO_SYS_SIGLIST) |
322 |
AC_DEFINE(NO_SYS_SIGLIST) |
320 |
fi |
323 |
fi |
321 |
|
324 |
|
322 |
# Check for sys_siglist decl (see Tue Jan 19 00:44:24 1999 in changelog) |
325 |
# Check for sys_siglist decl (see Tue Jan 19 00:44:24 1999 in changelog) |
323 |
AC_MSG_CHECKING(for sys_siglist declaration) |
326 |
AC_MSG_CHECKING(for sys_siglist declaration) |
324 |
AC_TRY_COMPILE([#include <signal.h>], [ |
327 |
AC_TRY_COMPILE( |
325 |
strlen (sys_siglist[0]); |
328 |
[#include <signal.h> |
326 |
], glib_ok=yes, glib_ok=no) |
329 |
],[strlen (sys_siglist[0]);], |
|
|
330 |
glib_ok="yes", |
331 |
glib_ok="no") |
327 |
AC_MSG_RESULT($glib_ok) |
332 |
AC_MSG_RESULT($glib_ok) |
328 |
if test $glib_ok = no; then |
333 |
|
|
|
334 |
if test "$glib_ok" = "no"; then |
329 |
AC_DEFINE(NO_SYS_SIGLIST_DECL) |
335 |
AC_DEFINE(NO_SYS_SIGLIST_DECL) |
330 |
fi |
336 |
fi |
331 |
|
337 |
|
332 |
# Check if <sys/select.h> needs to be included for fd_set |
338 |
# Check if <sys/select.h> needs to be included for fd_set |
333 |
AC_MSG_CHECKING([for fd_set]) |
339 |
AC_MSG_CHECKING([for fd_set]) |
334 |
AC_TRY_COMPILE([#include <sys/types.h>], |
340 |
AC_TRY_COMPILE([#include <sys/types.h> |
335 |
[fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no) |
341 |
],[fd_set readMask, writeMask;], |
336 |
if test $gtk_ok = yes; then |
342 |
gtk_ok="yes", |
|
|
343 |
gtk_ok="no") |
344 |
|
345 |
if test "$gtk_ok" = "yes"; then |
337 |
AC_MSG_RESULT([yes, found in sys/types.h]) |
346 |
AC_MSG_RESULT([yes, found in sys/types.h]) |
338 |
else |
347 |
else |
339 |
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes) |
348 |
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok="yes") |
340 |
if test $gtk_ok = yes; then |
349 |
if test "$gtk_ok" = "yes"; then |
341 |
AC_DEFINE(HAVE_SYS_SELECT_H) |
350 |
AC_DEFINE(HAVE_SYS_SELECT_H) |
342 |
AC_MSG_RESULT([yes, found in sys/select.h]) |
351 |
AC_MSG_RESULT([yes, found in sys/select.h]) |
343 |
else |
352 |
else |
Lines 354-361
Link Here
|
354 |
# Check for wchar.h |
363 |
# Check for wchar.h |
355 |
|
364 |
|
356 |
AC_MSG_CHECKING(for wchar.h) |
365 |
AC_MSG_CHECKING(for wchar.h) |
357 |
AC_TRY_CPP([#include <wchar.h>], glib_wchar_h=yes, glib_wchar_h=no) |
366 |
AC_TRY_CPP([#include <wchar.h> |
358 |
if test $glib_wchar_h = yes; then |
367 |
],glib_wchar_h="yes", |
|
|
368 |
glib_wchar_h="no") |
369 |
|
370 |
if test "$glib_wchar_h" = "yes"; then |
359 |
AC_DEFINE(HAVE_WCHAR_H) |
371 |
AC_DEFINE(HAVE_WCHAR_H) |
360 |
fi |
372 |
fi |
361 |
AC_MSG_RESULT($glib_wchar_h) |
373 |
AC_MSG_RESULT($glib_wchar_h) |
Lines 364-370
Link Here
|
364 |
|
376 |
|
365 |
AC_MSG_CHECKING(for wctype.h) |
377 |
AC_MSG_CHECKING(for wctype.h) |
366 |
AC_TRY_CPP([#include <wctype.h>], glib_wctype_h=yes, glib_wctype_h=no) |
378 |
AC_TRY_CPP([#include <wctype.h>], glib_wctype_h=yes, glib_wctype_h=no) |
367 |
if test $glib_wctype_h = yes; then |
379 |
if test "$glib_wctype_h" = "yes"; then |
368 |
AC_DEFINE(HAVE_WCTYPE_H) |
380 |
AC_DEFINE(HAVE_WCTYPE_H) |
369 |
fi |
381 |
fi |
370 |
AC_MSG_RESULT($glib_wctype_h) |
382 |
AC_MSG_RESULT($glib_wctype_h) |
Lines 375-382
Link Here
|
375 |
|
387 |
|
376 |
# The following is necessary for Linux libc-5.4.38 |
388 |
# The following is necessary for Linux libc-5.4.38 |
377 |
AC_MSG_CHECKING(if iswalnum() and friends are properly defined) |
389 |
AC_MSG_CHECKING(if iswalnum() and friends are properly defined) |
378 |
AC_TRY_LINK([#include <stdlib.h>],[ |
390 |
AC_TRY_LINK([#include <stdlib.h> |
379 |
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H)) |
391 |
],[#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H)) |
380 |
# ifdef HAVE_WCTYPE_H |
392 |
# ifdef HAVE_WCTYPE_H |
381 |
# include <wctype.h> |
393 |
# include <wctype.h> |
382 |
# else |
394 |
# else |
Lines 387-415
Link Here
|
387 |
#else |
399 |
#else |
388 |
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) |
400 |
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) |
389 |
#endif |
401 |
#endif |
390 |
iswalnum((wchar_t) 0); |
402 |
iswalnum((wchar_t) 0);], |
391 |
], glib_working_wctype=yes, glib_working_wctype=no) |
403 |
glib_working_wctype="yes", |
|
|
404 |
glib_working_wctype="no" |
405 |
) |
406 |
|
392 |
LIBS="$oLIBS" |
407 |
LIBS="$oLIBS" |
393 |
|
408 |
|
394 |
if test $glib_working_wctype = no; then |
409 |
if test "$glib_working_wctype" = "no"; then |
395 |
AC_DEFINE(HAVE_BROKEN_WCTYPE) |
410 |
AC_DEFINE(HAVE_BROKEN_WCTYPE) |
396 |
fi |
411 |
fi |
397 |
AC_MSG_RESULT($glib_working_wctype) |
412 |
AC_MSG_RESULT($glib_working_wctype) |
398 |
|
413 |
|
399 |
dnl *** check for sane realloc() *** |
414 |
dnl *** check for sane realloc() *** |
400 |
AC_MSG_CHECKING(whether realloc (NULL,) will work) |
415 |
AC_MSG_CHECKING(whether realloc (NULL,) will work) |
401 |
AC_CACHE_VAL(glib_cv_sane_realloc,[ |
416 |
AC_CACHE_VAL(glib_cv_sane_realloc, |
402 |
AC_TRY_RUN([ |
417 |
[AC_TRY_RUN([#include <stdlib.h> |
403 |
#include <stdlib.h> |
|
|
404 |
int main() { |
418 |
int main() { |
405 |
return realloc (0, sizeof (int)) == 0; |
419 |
return realloc (0, sizeof (int)) == 0; |
406 |
}], |
420 |
}], |
407 |
glib_cv_sane_realloc=yes |
421 |
glib_cv_sane_realloc="yes", |
|
|
422 |
glib_cv_sane_realloc="no" |
423 |
)] |
424 |
) |
425 |
if test "$glib_cv_sane_realloc" = "yes"; then |
408 |
AC_DEFINE(REALLOC_0_WORKS) |
426 |
AC_DEFINE(REALLOC_0_WORKS) |
409 |
, |
427 |
fi |
410 |
glib_cv_sane_realloc=no |
|
|
411 |
,) |
412 |
]) |
413 |
AC_MSG_RESULT($glib_cv_sane_realloc) |
428 |
AC_MSG_RESULT($glib_cv_sane_realloc) |
414 |
|
429 |
|
415 |
|
430 |
|
Lines 419-427
Link Here
|
419 |
dnl we currently check for all three va_copy possibilities, so we get |
434 |
dnl we currently check for all three va_copy possibilities, so we get |
420 |
dnl all results in config.log for bug reports. |
435 |
dnl all results in config.log for bug reports. |
421 |
AC_MSG_CHECKING(for an implementation of va_copy()) |
436 |
AC_MSG_CHECKING(for an implementation of va_copy()) |
422 |
AC_CACHE_VAL(glib_cv_va_copy,[ |
437 |
AC_CACHE_VAL(glib_cv_va_copy, |
423 |
AC_TRY_RUN([ |
438 |
[AC_TRY_RUN([#include <stdarg.h> |
424 |
#include <stdarg.h> |
|
|
425 |
void f (int i, ...) { |
439 |
void f (int i, ...) { |
426 |
va_list args1, args2; |
440 |
va_list args1, args2; |
427 |
va_start (args1, i); |
441 |
va_start (args1, i); |
Lines 434-449
Link Here
|
434 |
f (0, 42); |
448 |
f (0, 42); |
435 |
return 0; |
449 |
return 0; |
436 |
}], |
450 |
}], |
437 |
glib_cv_va_copy=yes |
451 |
glib_cv_va_copy="yes", |
438 |
, |
452 |
glib_cv_va_copy="no" |
439 |
glib_cv_va_copy=no |
453 |
)] |
440 |
,) |
454 |
|
441 |
]) |
455 |
) |
442 |
AC_MSG_RESULT($glib_cv_va_copy) |
456 |
AC_MSG_RESULT($glib_cv_va_copy) |
443 |
AC_MSG_CHECKING(for an implementation of __va_copy()) |
457 |
AC_MSG_CHECKING(for an implementation of __va_copy()) |
444 |
AC_CACHE_VAL(glib_cv___va_copy,[ |
458 |
AC_CACHE_VAL(glib_cv___va_copy,[ |
445 |
AC_TRY_RUN([ |
459 |
AC_TRY_RUN([#include <stdarg.h> |
446 |
#include <stdarg.h> |
|
|
447 |
void f (int i, ...) { |
460 |
void f (int i, ...) { |
448 |
va_list args1, args2; |
461 |
va_list args1, args2; |
449 |
va_start (args1, i); |
462 |
va_start (args1, i); |
Lines 456-471
Link Here
|
456 |
f (0, 42); |
469 |
f (0, 42); |
457 |
return 0; |
470 |
return 0; |
458 |
}], |
471 |
}], |
459 |
glib_cv___va_copy=yes |
472 |
glib_cv___va_copy="yes", |
460 |
, |
473 |
glib_cv___va_copy="no" |
461 |
glib_cv___va_copy=no |
474 |
)] |
462 |
,) |
475 |
) |
463 |
]) |
|
|
464 |
AC_MSG_RESULT($glib_cv___va_copy) |
476 |
AC_MSG_RESULT($glib_cv___va_copy) |
465 |
AC_MSG_CHECKING(whether va_lists can be copied by value) |
477 |
AC_MSG_CHECKING([whether va_lists can be copied by value]) |
466 |
AC_CACHE_VAL(glib_cv_va_val_copy,[ |
478 |
AC_CACHE_VAL(glib_cv_va_val_copy, |
467 |
AC_TRY_RUN([ |
479 |
[AC_TRY_RUN( |
468 |
#include <stdarg.h> |
480 |
[#include <stdarg.h> |
469 |
void f (int i, ...) { |
481 |
void f (int i, ...) { |
470 |
va_list args1, args2; |
482 |
va_list args1, args2; |
471 |
va_start (args1, i); |
483 |
va_start (args1, i); |
Lines 478-500
Link Here
|
478 |
f (0, 42); |
490 |
f (0, 42); |
479 |
return 0; |
491 |
return 0; |
480 |
}], |
492 |
}], |
481 |
glib_cv_va_val_copy=yes |
493 |
glib_cv_va_val_copy="yes", |
482 |
, |
494 |
glib_cv_va_val_copy="no", |
483 |
glib_cv_va_val_copy=no |
495 |
)] |
484 |
,) |
496 |
) |
485 |
]) |
497 |
|
486 |
if test "x$glib_cv_va_copy" = "xyes"; then |
498 |
if test "x$glib_cv_va_copy" = "xyes"; then |
487 |
AC_DEFINE(G_VA_COPY, va_copy) |
499 |
AC_DEFINE(G_VA_COPY, va_copy) |
488 |
else if test "x$glib_cv___va_copy" = "xyes"; then |
500 |
else |
|
|
501 |
if test "x$glib_cv___va_copy" = "xyes"; then |
489 |
AC_DEFINE(G_VA_COPY, __va_copy) |
502 |
AC_DEFINE(G_VA_COPY, __va_copy) |
490 |
fi |
503 |
fi |
491 |
fi |
504 |
fi |
|
|
505 |
|
492 |
if test "x$glib_cv_va_val_copy" = "xno"; then |
506 |
if test "x$glib_cv_va_val_copy" = "xno"; then |
493 |
AC_DEFINE(G_VA_COPY_AS_ARRAY) |
507 |
AC_DEFINE(G_VA_COPY_AS_ARRAY) |
494 |
fi |
508 |
fi |
495 |
AC_MSG_RESULT($glib_cv_va_val_copy) |
509 |
AC_MSG_RESULT($glib_cv_va_val_copy) |
496 |
|
|
|
497 |
|
498 |
dnl *********************** |
510 |
dnl *********************** |
499 |
dnl *** g_module checks *** |
511 |
dnl *** g_module checks *** |
500 |
dnl *********************** |
512 |
dnl *********************** |
Lines 503-525
Link Here
|
503 |
dnl G_MODULE_IMPL= don't reset, so cmd-line can override |
515 |
dnl G_MODULE_IMPL= don't reset, so cmd-line can override |
504 |
G_MODULE_NEED_USCORE=0 |
516 |
G_MODULE_NEED_USCORE=0 |
505 |
G_MODULE_BROKEN_RTLD_GLOBAL=0 |
517 |
G_MODULE_BROKEN_RTLD_GLOBAL=0 |
506 |
G_MODULE_HAVE_DLERROR=0 |
|
|
507 |
dnl *** dlopen() and dlsym() in system libraries |
518 |
dnl *** dlopen() and dlsym() in system libraries |
508 |
if test -z "$G_MODULE_IMPL"; then |
519 |
if test -z "$G_MODULE_IMPL"; then |
509 |
AC_CHECK_FUNC(dlopen, |
520 |
AC_CHECK_FUNC(dlopen, |
510 |
AC_CHECK_FUNC(dlsym, |
521 |
[AC_CHECK_FUNC(dlsym,G_MODULE_IMPL="G_MODULE_IMPL_DL")]) |
511 |
G_MODULE_IMPL=G_MODULE_IMPL_DL |
|
|
512 |
,) |
513 |
,) |
514 |
fi |
522 |
fi |
515 |
dnl *** dlopen() and dlsym() in libdl |
523 |
dnl *** dlopen() and dlsym() in libdl |
516 |
if test -z "$G_MODULE_IMPL"; then |
524 |
if test -z "$G_MODULE_IMPL"; then |
517 |
AC_CHECK_LIB(dl, dlopen, |
525 |
AC_CHECK_LIB(dl, dlopen, |
518 |
AC_CHECK_LIB(dl, dlsym, |
526 |
[AC_CHECK_LIB(dl, dlsym, |
519 |
G_MODULE_LIBS=-ldl |
527 |
G_MODULE_LIBS=-ldl |
520 |
G_MODULE_IMPL=G_MODULE_IMPL_DL |
528 |
G_MODULE_IMPL=G_MODULE_IMPL_DL)]) |
521 |
,) |
|
|
522 |
,) |
523 |
fi |
529 |
fi |
524 |
dnl *** shl_load() in libdld (HP-UX) |
530 |
dnl *** shl_load() in libdld (HP-UX) |
525 |
if test -z "$G_MODULE_IMPL"; then |
531 |
if test -z "$G_MODULE_IMPL"; then |
Lines 527-554
Link Here
|
527 |
SAVED_LDFLAGS=$LDFLAGS |
533 |
SAVED_LDFLAGS=$LDFLAGS |
528 |
LDFLAGS="$LDFLAGS -Wl,-E" |
534 |
LDFLAGS="$LDFLAGS -Wl,-E" |
529 |
AC_TRY_LINK(,[ return 0; ], |
535 |
AC_TRY_LINK(,[ return 0; ], |
530 |
[ G_MODULE_LDFLAGS="-Wl,-E" ],[ |
536 |
[G_MODULE_LDFLAGS="-Wl,-E"], |
531 |
LDFLAGS="$SAVED_LDFLAGS -bexpall" |
537 |
[LDFLAGS="$SAVED_LDFLAGS -bexpall" |
532 |
AC_TRY_LINK(,[ return 0; ], |
538 |
AC_TRY_LINK(,[ return 0; ], |
533 |
G_MODULE_LDFLAGS="-bexpall", |
539 |
G_MODULE_LDFLAGS="-bexpall", |
534 |
G_MODULE_LDFLAGS="none" |
540 |
G_MODULE_LDFLAGS="none" |
|
|
541 |
)] |
535 |
) |
542 |
) |
536 |
]) |
543 |
LDFLAGS="$SAVED_LDFLAGS" |
537 |
LDFLAGS=$SAVED_LDFLAGS |
|
|
538 |
AC_MSG_RESULT($G_MODULE_LDFLAGS) |
544 |
AC_MSG_RESULT($G_MODULE_LDFLAGS) |
539 |
if test "x$G_MODULE_LDFLAGS" = "xnone"; then |
545 |
if test "x$G_MODULE_LDFLAGS" = "xnone"; then |
540 |
G_MODULE_LDFLAGS= |
546 |
G_MODULE_LDFLAGS= |
541 |
fi |
547 |
fi |
542 |
AC_CHECK_LIB(dld, shl_load, |
548 |
AC_CHECK_LIB(dld, shl_load, |
543 |
G_MODULE_LIBS=-ldld |
549 |
G_MODULE_LIBS="-ldld" |
544 |
G_MODULE_IMPL=G_MODULE_IMPL_DLD |
550 |
G_MODULE_IMPL="G_MODULE_IMPL_DLD") |
545 |
,) |
|
|
546 |
fi |
551 |
fi |
547 |
dnl *** additional checks for G_MODULE_IMPL_DL |
552 |
dnl *** additional checks for G_MODULE_IMPL_DL |
548 |
if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then |
553 |
if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then |
549 |
case "$host_os" in |
554 |
case "$host_os" in |
550 |
linux*) |
555 |
linux*) |
551 |
G_MODULE_LDFLAGS='-rdynamic' |
556 |
G_MODULE_LDFLAGS="-rdynamic" |
552 |
;; |
557 |
;; |
553 |
esac |
558 |
esac |
554 |
LIBS_orig="$LIBS" |
559 |
LIBS_orig="$LIBS" |
Lines 557-565
Link Here
|
557 |
LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" |
562 |
LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" |
558 |
dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness |
563 |
dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness |
559 |
AC_CACHE_CHECK([for RTLD_GLOBAL brokenness], |
564 |
AC_CACHE_CHECK([for RTLD_GLOBAL brokenness], |
560 |
glib_cv_rtldglobal_broken,[ |
565 |
glib_cv_rtldglobal_broken, |
561 |
AC_TRY_RUN([ |
566 |
[AC_TRY_RUN([#include<dlfcn.h> |
562 |
#include <dlfcn.h> |
|
|
563 |
#ifndef RTLD_GLOBAL |
567 |
#ifndef RTLD_GLOBAL |
564 |
#define RTLD_GLOBAL 0 |
568 |
#define RTLD_GLOBAL 0 |
565 |
#endif |
569 |
#endif |
Lines 575-582
Link Here
|
575 |
local = dlsym (handle, "pthread_create"); |
579 |
local = dlsym (handle, "pthread_create"); |
576 |
return global == local; |
580 |
return global == local; |
577 |
}], |
581 |
}], |
578 |
[glib_cv_rtldglobal_broken=no], |
582 |
[glib_cv_rtldglobal_broken="no"], |
579 |
[glib_cv_rtldglobal_broken=yes], |
583 |
[glib_cv_rtldglobal_broken="yes"], |
580 |
[]) |
584 |
[]) |
581 |
rm -f plugin.c plugin.o plugin.lo |
585 |
rm -f plugin.c plugin.o plugin.lo |
582 |
]) |
586 |
]) |
Lines 587-595
Link Here
|
587 |
fi |
591 |
fi |
588 |
dnl *** check whether we need preceeding underscores |
592 |
dnl *** check whether we need preceeding underscores |
589 |
AC_MSG_CHECKING(for preceeding underscore in symbols) |
593 |
AC_MSG_CHECKING(for preceeding underscore in symbols) |
590 |
AC_CACHE_VAL(glib_cv_uscore,[ |
594 |
AC_CACHE_VAL(glib_cv_uscore, |
591 |
AC_TRY_RUN([ |
595 |
[AC_TRY_RUN([#include <dlfcn.h> |
592 |
#include <dlfcn.h> |
|
|
593 |
int glib_underscore_test (void) { return 42; } |
596 |
int glib_underscore_test (void) { return 42; } |
594 |
int main() { |
597 |
int main() { |
595 |
void *f1 = (void*)0, *f2 = (void*)0, *handle; |
598 |
void *f1 = (void*)0, *f2 = (void*)0, *handle; |
Lines 599-606
Link Here
|
599 |
f2 = dlsym (handle, "_glib_underscore_test"); |
602 |
f2 = dlsym (handle, "_glib_underscore_test"); |
600 |
} return (!f2 || f1); |
603 |
} return (!f2 || f1); |
601 |
}], |
604 |
}], |
602 |
glib_cv_uscore=yes, |
605 |
glib_cv_uscore="yes", |
603 |
glib_cv_uscore=no, |
606 |
glib_cv_uscore="no" |
604 |
) |
607 |
) |
605 |
rm -f plugin.c plugin.o plugin.lo |
608 |
rm -f plugin.c plugin.o plugin.lo |
606 |
]) |
609 |
]) |
Lines 613-621
Link Here
|
613 |
|
616 |
|
614 |
LDFLAGS="$LDFLAGS_orig" |
617 |
LDFLAGS="$LDFLAGS_orig" |
615 |
dnl *** check for having dlerror() |
618 |
dnl *** check for having dlerror() |
616 |
AC_CHECK_FUNC(dlerror, |
619 |
AC_CHECK_FUNC(dlerror,G_MODULE_HAVE_DLERROR=1,G_MODULE_HAVE_DLERROR=0) |
617 |
G_MODULE_HAVE_DLERROR=1, |
|
|
618 |
G_MODULE_HAVE_DLERROR=0) |
619 |
LIBS="$LIBS_orig" |
620 |
LIBS="$LIBS_orig" |
620 |
fi |
621 |
fi |
621 |
dnl *** done, have e got an implementation? |
622 |
dnl *** done, have e got an implementation? |
Lines 636-652
Link Here
|
636 |
dnl *********************** |
637 |
dnl *********************** |
637 |
|
638 |
|
638 |
AC_ARG_WITH(threads, [ --with-threads=[none/posix/solaris/nspr] specify a thread implementation to use], |
639 |
AC_ARG_WITH(threads, [ --with-threads=[none/posix/solaris/nspr] specify a thread implementation to use], |
639 |
if test "x$with_threads" = x; then |
640 |
if test "x$with_threads" = "x"; then |
640 |
want_threads=yes |
641 |
want_threads="yes" |
641 |
else |
642 |
else |
642 |
want_threads=$with_threads |
643 |
want_threads="$with_threads" |
643 |
fi, |
644 |
fi, |
644 |
want_threads=yes) |
645 |
want_threads="yes") |
645 |
if test "x$enable_threads" = "xno"; then |
646 |
if test "x$enable_threads" = "xno"; then |
646 |
want_threads=no |
647 |
want_threads="no" |
647 |
fi |
648 |
fi |
648 |
if test "x$want_threads" = "xnone"; then |
649 |
if test "x$want_threads" = "xnone"; then |
649 |
want_threads=no |
650 |
want_threads="no" |
650 |
fi |
651 |
fi |
651 |
|
652 |
|
652 |
dnl error and warning message |
653 |
dnl error and warning message |
Lines 660-667
Link Here
|
660 |
compilation now, but then your programs might not work. |
661 |
compilation now, but then your programs might not work. |
661 |
Please provide information on how it is done on your system." |
662 |
Please provide information on how it is done on your system." |
662 |
|
663 |
|
663 |
LIBS_NOT_FOUND_1="I can't find the libraries for the thread implementation |
664 |
LIBS_NOT_FOUND_1="I can't find the libraries for the thread implementation" |
664 |
" |
|
|
665 |
|
665 |
|
666 |
LIBS_NOT_FOUND_2=". Please choose another thread implementation or |
666 |
LIBS_NOT_FOUND_2=". Please choose another thread implementation or |
667 |
provide information on your thread implementation. |
667 |
provide information on your thread implementation. |
Lines 678-705
Link Here
|
678 |
dnl determination of thread implementation |
678 |
dnl determination of thread implementation |
679 |
dnl *************************************** |
679 |
dnl *************************************** |
680 |
|
680 |
|
681 |
have_threads=none |
681 |
have_threads="none" |
682 |
if test "x$want_threads" = xyes || test "x$want_threads" = xsolaris; then |
682 |
if test "x$want_threads" = "xyes" || test "x$want_threads" = "xsolaris"; then |
683 |
case $host in |
683 |
case "$host" in |
684 |
*-*-solaris*) |
684 |
*-*-solaris*) |
685 |
AC_CHECK_LIB(thread, cond_init, have_threads=solaris) |
685 |
AC_CHECK_LIB(thread, cond_init, have_threads=solaris) |
686 |
;; |
686 |
;; |
687 |
esac |
687 |
esac |
688 |
fi |
688 |
fi |
689 |
if test "x$want_threads" = xyes || test "x$want_threads" = xposix; then |
689 |
if test "x$want_threads" = "xyes" || test "x$want_threads" = "xposix"; then |
690 |
if test "x$have_threads" = xnone; then |
690 |
if test "x$have_threads" = "xnone"; then |
691 |
AC_CHECK_HEADER(pthread.h, have_threads=posix) |
691 |
AC_CHECK_HEADER(pthread.h, have_threads=posix) |
692 |
fi |
692 |
fi |
693 |
fi |
693 |
fi |
694 |
if test "x$want_threads" = xyes || test "x$want_threads" = xnspr; then |
694 |
if test "x$want_threads" = "xyes" || test "x$want_threads" = "xnspr"; then |
695 |
if test "x$have_threads" = xnone; then |
695 |
if test "x$have_threads" = "xnone"; then |
696 |
AC_CHECK_LIB(nspr21, PRP_NewNakedCondVar, have_threads=nspr) |
696 |
AC_CHECK_LIB(nspr21, PRP_NewNakedCondVar, have_threads="nspr") |
697 |
fi |
697 |
fi |
698 |
fi |
698 |
fi |
699 |
|
699 |
|
700 |
AC_MSG_CHECKING(for thread implementation) |
700 |
AC_MSG_CHECKING(for thread implementation) |
701 |
|
701 |
|
702 |
if test "x$have_threads" = xnone && test "x$want_threads" != xno; then |
702 |
if test "x$have_threads" = "xnone" && test "x$want_threads" != "xno"; then |
703 |
AC_MSG_RESULT(none available) |
703 |
AC_MSG_RESULT(none available) |
704 |
AC_MSG_WARN($THREAD_NO_IMPLEMENTATION) |
704 |
AC_MSG_WARN($THREAD_NO_IMPLEMENTATION) |
705 |
else |
705 |
else |
Lines 713-760
Link Here
|
713 |
G_THREAD_LIBS= |
713 |
G_THREAD_LIBS= |
714 |
G_THREAD_CFLAGS= |
714 |
G_THREAD_CFLAGS= |
715 |
|
715 |
|
716 |
mutex_has_default=no |
716 |
mutex_has_default="no" |
717 |
case $have_threads in |
717 |
case "$have_threads" in |
718 |
posix) |
718 |
posix) |
719 |
G_THREAD_LIBS=error |
719 |
G_THREAD_LIBS="error" |
720 |
AC_CHECK_LIB(pthread, pthread_attr_init, |
720 |
AC_CHECK_LIB(pthread, pthread_attr_init, |
721 |
G_THREAD_LIBS="-lpthread") |
721 |
G_THREAD_LIBS="-lpthread") |
722 |
if test "x$G_THREAD_LIBS" = xerror; then |
722 |
if test "x$G_THREAD_LIBS" = "xerror"; then |
723 |
AC_CHECK_LIB(pthreads, pthread_attr_init, |
723 |
AC_CHECK_LIB(pthreads, pthread_attr_init, |
724 |
G_THREAD_LIBS="-lpthreads") |
724 |
G_THREAD_LIBS="-lpthreads") |
725 |
fi |
725 |
fi |
726 |
if test "x$G_THREAD_LIBS" = xerror; then |
726 |
if test "x$G_THREAD_LIBS" = "xerror"; then |
727 |
AC_CHECK_LIB(thread, pthread_attr_init, |
727 |
AC_CHECK_LIB(thread, pthread_attr_init, |
728 |
G_THREAD_LIBS="-lthread") |
728 |
G_THREAD_LIBS="-lthread") |
729 |
fi |
729 |
fi |
730 |
if test "x$G_THREAD_LIBS" = xerror; then |
730 |
if test "x$G_THREAD_LIBS" = "xerror"; then |
731 |
AC_CHECK_LIB(c_r, pthread_attr_init, |
731 |
AC_CHECK_LIB(c_r, pthread_attr_init, |
732 |
G_THREAD_LIBS="-lc_r") |
732 |
G_THREAD_LIBS="-lc_r") |
733 |
fi |
733 |
fi |
734 |
if test "x$G_THREAD_LIBS" = xerror; then |
734 |
if test "x$G_THREAD_LIBS" = "xerror"; then |
735 |
AC_CHECK_FUNC(pthread_attr_init, G_THREAD_LIBS="") |
735 |
AC_CHECK_FUNC(pthread_attr_init, G_THREAD_LIBS="") |
736 |
fi |
736 |
fi |
737 |
dnl ********** DG/UX ************ |
737 |
dnl ********** DG/UX ************ |
738 |
if test "x$G_THREAD_LIBS" = xerror; then |
738 |
if test "x$G_THREAD_LIBS" = "xerror"; then |
739 |
AC_CHECK_LIB(thread, __d10_pthread_attr_init, |
739 |
AC_CHECK_LIB(thread, __d10_pthread_attr_init, |
740 |
G_THREAD_LIBS="-lthread" |
740 |
G_THREAD_LIBS="-lthread" |
741 |
G_THREAD_CFLAGS="-D_POSIX4A_DRAFT10_SOURCE") |
741 |
G_THREAD_CFLAGS="-D_POSIX4A_DRAFT10_SOURCE") |
742 |
fi |
742 |
fi |
743 |
dnl ********* HPUX 11 *********** |
743 |
dnl ********* HPUX 11 *********** |
744 |
if test "x$G_THREAD_LIBS" = xerror; then |
744 |
if test "x$G_THREAD_LIBS" = "xerror"; then |
745 |
AC_CHECK_LIB(pthread, __pthread_attr_init_system, |
745 |
AC_CHECK_LIB(pthread, __pthread_attr_init_system, |
746 |
G_THREAD_LIBS="-lpthread") |
746 |
G_THREAD_LIBS="-lpthread") |
747 |
fi |
747 |
fi |
748 |
mutex_has_default=yes |
748 |
mutex_has_default="yes" |
749 |
mutex_default_type='pthread_mutex_t' |
749 |
mutex_default_type='pthread_mutex_t' |
750 |
mutex_default_init='PTHREAD_MUTEX_INITIALIZER' |
750 |
mutex_default_init='PTHREAD_MUTEX_INITIALIZER' |
751 |
mutex_header_file='pthread.h' |
751 |
mutex_header_file='pthread.h' |
752 |
g_threads_impl="POSIX" |
752 |
g_threads_impl="POSIX" |
753 |
;; |
753 |
;; |
754 |
solaris) |
754 |
solaris) |
755 |
G_THREAD_LIBS=error |
755 |
G_THREAD_LIBS="error" |
756 |
AC_CHECK_LIB(thread, cond_init, G_THREAD_LIBS="-lthread") |
756 |
AC_CHECK_LIB(thread, cond_init, |
757 |
mutex_has_default=yes |
757 |
G_THREAD_LIBS="-lthread") |
|
|
758 |
mutex_has_default="yes" |
758 |
mutex_default_type='mutex_t' |
759 |
mutex_default_type='mutex_t' |
759 |
mutex_default_init="DEFAULTMUTEX" |
760 |
mutex_default_init="DEFAULTMUTEX" |
760 |
mutex_header_file='thread.h' |
761 |
mutex_header_file='thread.h' |
Lines 770-780
Link Here
|
770 |
;; |
771 |
;; |
771 |
*) |
772 |
*) |
772 |
g_threads_impl="NONE" |
773 |
g_threads_impl="NONE" |
773 |
G_THREAD_LIBS=error |
774 |
G_THREAD_LIBS="error" |
774 |
;; |
775 |
;; |
775 |
esac |
776 |
esac |
776 |
|
777 |
|
777 |
if test "x$G_THREAD_LIBS" = xerror; then |
778 |
if test "x$G_THREAD_LIBS" = "xerror"; then |
778 |
AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2) |
779 |
AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2) |
779 |
fi |
780 |
fi |
780 |
|
781 |
|
Lines 784-796
Link Here
|
784 |
dnl determination of G_THREAD_CFLAGS |
785 |
dnl determination of G_THREAD_CFLAGS |
785 |
dnl ******************************** |
786 |
dnl ******************************** |
786 |
|
787 |
|
787 |
if test x"$have_threads" != xnone; then |
788 |
if test "x$have_threads" != "xnone"; then |
788 |
G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_REENTRANT" # good default guess |
789 |
G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_REENTRANT" # good default guess |
789 |
|
|
|
790 |
case $host in |
790 |
case $host in |
791 |
*-aix*) |
791 |
*-aix*) |
792 |
G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE" |
792 |
G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE" |
793 |
if test x"$GCC" = xyes; then |
793 |
if test "x$GCC" = "xyes"; then |
794 |
G_THREAD_CFLAGS="$G_THREAD_CFLAGS -mthreads" |
794 |
G_THREAD_CFLAGS="$G_THREAD_CFLAGS -mthreads" |
795 |
fi |
795 |
fi |
796 |
;; |
796 |
;; |
Lines 805-816
Link Here
|
805 |
# if we are not finding the ctime_r function, then we probably are |
805 |
# if we are not finding the ctime_r function, then we probably are |
806 |
# not using the proper multithread flag |
806 |
# not using the proper multithread flag |
807 |
# Note: Digital UNIX 4.0d #defines ctime_r to _Pctime_r for gcc. |
807 |
# Note: Digital UNIX 4.0d #defines ctime_r to _Pctime_r for gcc. |
808 |
old_CPPFLAGS=$CPPFLAGS |
808 |
old_CPPFLAGS="$CPPFLAGS" |
809 |
CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" |
809 |
CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" |
810 |
AC_EGREP_HEADER([[^a-zA-Z_](_P)?ctime_r[^a-zA-Z_]], time.h, , |
810 |
AC_EGREP_HEADER([[^a-zA-Z_](_P)?ctime_r[^a-zA-Z_]], time.h, , |
811 |
G_THREAD_CFLAGS= |
811 |
G_THREAD_CFLAGS= |
812 |
AC_MSG_WARN($FLAG_DOES_NOT_WORK)) |
812 |
AC_MSG_WARN($FLAG_DOES_NOT_WORK)) |
813 |
CPPFLAGS=$old_CPPFLAGS |
813 |
CPPFLAGS="$old_CPPFLAGS" |
814 |
|
814 |
|
815 |
AC_MSG_CHECKING(necessary compiler options) |
815 |
AC_MSG_CHECKING(necessary compiler options) |
816 |
|
816 |
|
Lines 822-828
Link Here
|
822 |
dnl check for mt safe function variants |
822 |
dnl check for mt safe function variants |
823 |
dnl *********************************** |
823 |
dnl *********************************** |
824 |
|
824 |
|
825 |
if test x"$have_threads" != xnone; then |
825 |
if test "x$have_threads" != "xnone"; then |
826 |
glib_save_LIBS="$LIBS" |
826 |
glib_save_LIBS="$LIBS" |
827 |
glib_save_CFLAGS="$CFLAGS" |
827 |
glib_save_CFLAGS="$CFLAGS" |
828 |
# we are not doing the following for now, as this might require glib |
828 |
# we are not doing the following for now, as this might require glib |
Lines 844-850
Link Here
|
844 |
return errno == ENOSYS || error == ENOSYS;}], |
844 |
return errno == ENOSYS || error == ENOSYS;}], |
845 |
[ac_cv_func_getpwuid_r=yes], |
845 |
[ac_cv_func_getpwuid_r=yes], |
846 |
[ac_cv_func_getpwuid_r=no])]) |
846 |
[ac_cv_func_getpwuid_r=no])]) |
847 |
if test "$ac_cv_func_getpwuid_r" = yes; then |
847 |
if test "$ac_cv_func_getpwuid_r" = "yes"; then |
848 |
AC_MSG_RESULT(yes) |
848 |
AC_MSG_RESULT(yes) |
849 |
AC_DEFINE(HAVE_GETPWUID_R) |
849 |
AC_DEFINE(HAVE_GETPWUID_R) |
850 |
else |
850 |
else |
Lines 854-869
Link Here
|
854 |
AC_MSG_CHECKING(whether getpwuid_r is posix like) |
854 |
AC_MSG_CHECKING(whether getpwuid_r is posix like) |
855 |
# The signature for the POSIX version is: |
855 |
# The signature for the POSIX version is: |
856 |
# int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **) |
856 |
# int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **) |
857 |
AC_TRY_COMPILE([#include <pwd.h> |
857 |
AC_TRY_COMPILE( |
|
|
858 |
[#include <pwd.h> |
858 |
#include <sys/types.h> |
859 |
#include <sys/types.h> |
859 |
#include <stdlib.h>], |
860 |
#include <stdlib.h> |
860 |
[getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL);], |
861 |
],[getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL);], |
861 |
[AC_DEFINE(HAVE_GETPWUID_R_POSIX) |
862 |
[AC_DEFINE(HAVE_GETPWUID_R_POSIX) |
862 |
AC_MSG_RESULT(yes)], |
863 |
AC_MSG_RESULT(yes)], |
863 |
[AC_MSG_RESULT(no)]) |
864 |
[AC_MSG_RESULT(no)]) |
864 |
fi |
865 |
fi |
865 |
fi |
866 |
fi |
866 |
if test x"$have_threads" = xposix; then |
867 |
if test "x$have_threads" = "xposix"; then |
867 |
LIBS="$LIBS $G_THREAD_LIBS" |
868 |
LIBS="$LIBS $G_THREAD_LIBS" |
868 |
AC_MSG_CHECKING(whether pthread_getspecific is posix like) |
869 |
AC_MSG_CHECKING(whether pthread_getspecific is posix like) |
869 |
# PCThreads has pthread_getspecific(pthread_key_t, void **); |
870 |
# PCThreads has pthread_getspecific(pthread_key_t, void **); |
Lines 926-939
Link Here
|
926 |
GLIB_IF_VAR_EQ(mutex_has_default, yes, |
927 |
GLIB_IF_VAR_EQ(mutex_has_default, yes, |
927 |
GLIB_SIZEOF([#include <$mutex_header_file>], |
928 |
GLIB_SIZEOF([#include <$mutex_header_file>], |
928 |
$mutex_default_type, |
929 |
$mutex_default_type, |
929 |
gmutex, |
930 |
gmutex) |
930 |
) |
|
|
931 |
GLIB_BYTE_CONTENTS([#include <$mutex_header_file>], |
931 |
GLIB_BYTE_CONTENTS([#include <$mutex_header_file>], |
932 |
$mutex_default_type, |
932 |
$mutex_default_type, |
933 |
gmutex, |
933 |
gmutex, |
934 |
$glib_cv_sizeof_gmutex, |
934 |
$glib_cv_sizeof_gmutex, |
935 |
$mutex_default_init) |
935 |
$mutex_default_init |
936 |
, |
936 |
) |
937 |
) |
937 |
) |
938 |
|
938 |
|
939 |
|
939 |
|
Lines 942-951
Link Here
|
942 |
dnl **************************************** |
942 |
dnl **************************************** |
943 |
GLIB_SYSDEFS( |
943 |
GLIB_SYSDEFS( |
944 |
[#include <sys/types.h> |
944 |
[#include <sys/types.h> |
945 |
#include <sys/poll.h>], |
945 |
#include <sys/poll.h> |
946 |
POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32, |
946 |
],[POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32], |
947 |
glibconfig-sysdefs.h, |
947 |
glibconfig-sysdefs.h,=) |
948 |
=) |
|
|
949 |
|
948 |
|
950 |
|
949 |
|
951 |
dnl ****************************** |
950 |
dnl ****************************** |
Lines 975-981
Link Here
|
975 |
cat > $outfile <<\_______EOF |
974 |
cat > $outfile <<\_______EOF |
976 |
/* glibconfig.h |
975 |
/* glibconfig.h |
977 |
* |
976 |
* |
978 |
* This is a generated file. Please modify `configure.in' |
977 |
* This is a generated file. Please modify 'configure.in' |
979 |
*/ |
978 |
*/ |
980 |
|
979 |
|
981 |
#ifndef GLIBCONFIG_H |
980 |
#ifndef GLIBCONFIG_H |
Lines 983-1002
Link Here
|
983 |
|
982 |
|
984 |
_______EOF |
983 |
_______EOF |
985 |
|
984 |
|
986 |
if test x$glib_limits_h = xyes; then |
985 |
if test "x$glib_limits_h" = "xyes"; then |
987 |
echo '#include <limits.h>' >> $outfile |
986 |
echo "#include <limits.h>" >> $outfile |
988 |
fi |
987 |
fi |
989 |
if test x$glib_float_h = xyes; then |
988 |
if test "x$glib_float_h" = "xyes"; then |
990 |
echo '#include <float.h>' >> $outfile |
989 |
echo "#include <float.h>" >> $outfile |
991 |
fi |
990 |
fi |
992 |
if test x$glib_values_h = xyes; then |
991 |
if test "x$glib_values_h" = "xyes"; then |
993 |
echo '#include <values.h>' >> $outfile |
992 |
echo "#include <values.h>" >> $outfile |
994 |
fi |
993 |
fi |
995 |
if test x$g_mutex_header_file != x; then |
994 |
if test "x$g_mutex_header_file" != "x"; then |
996 |
echo '#include <'"$g_mutex_header_file"'>' >> $outfile |
995 |
echo '#include <'"$g_mutex_header_file"'>' >> $outfile |
997 |
fi |
996 |
fi |
998 |
if test x$glib_sys_poll_h = xyes; then |
997 |
if test "x$glib_sys_poll_h" = "xyes"; then |
999 |
echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile |
998 |
echo "#define GLIB_HAVE_SYS_POLL_H" >> $outfile |
1000 |
fi |
999 |
fi |
1001 |
|
1000 |
|
1002 |
cat >> $outfile <<_______EOF |
1001 |
cat >> $outfile <<_______EOF |
Lines 1084-1090
Link Here
|
1084 |
_______EOF |
1083 |
_______EOF |
1085 |
|
1084 |
|
1086 |
echo >>$outfile |
1085 |
echo >>$outfile |
1087 |
if test x$g_mutex_has_default = xyes; then |
1086 |
if test "x$g_mutex_has_default" = "xyes"; then |
1088 |
cat >>$outfile <<_______EOF |
1087 |
cat >>$outfile <<_______EOF |
1089 |
$g_enable_threads_def G_THREADS_ENABLED |
1088 |
$g_enable_threads_def G_THREADS_ENABLED |
1090 |
#define G_THREADS_IMPL_$g_threads_impl_def |
1089 |
#define G_THREADS_IMPL_$g_threads_impl_def |
Lines 1141-1147
Link Here
|
1141 |
|
1140 |
|
1142 |
_______EOF |
1141 |
_______EOF |
1143 |
|
1142 |
|
1144 |
if test -r glibconfig-sysdefs.h; then |
1143 |
if test -r "glibconfig-sysdefs.h"; then |
1145 |
cat glibconfig-sysdefs.h >>$outfile |
1144 |
cat glibconfig-sysdefs.h >>$outfile |
1146 |
fi |
1145 |
fi |
1147 |
|
1146 |
|
Lines 1160-1166
Link Here
|
1160 |
|
1159 |
|
1161 |
|
1160 |
|
1162 |
if cmp -s $outfile glibconfig.h; then |
1161 |
if cmp -s $outfile glibconfig.h; then |
1163 |
echo glibconfig.h is unchanged |
1162 |
echo "glibconfig.h is unchanged" |
1164 |
rm -f $outfile |
1163 |
rm -f $outfile |
1165 |
else |
1164 |
else |
1166 |
mv $outfile glibconfig.h |
1165 |
mv $outfile glibconfig.h |
Lines 1173-1228
Link Here
|
1173 |
# on variable expansion in case labels. Look at the generated config.status |
1172 |
# on variable expansion in case labels. Look at the generated config.status |
1174 |
# for a hint. |
1173 |
# for a hint. |
1175 |
|
1174 |
|
1176 |
case xyes in |
1175 |
case "xyes" in |
1177 |
x$ac_cv_header_float_h) |
1176 |
x$ac_cv_header_float_h) |
1178 |
glib_float_h=yes |
1177 |
glib_float_h="yes" |
1179 |
glib_mf=FLT_MIN glib_Mf=FLT_MAX |
1178 |
glib_mf=FLT_MIN glib_Mf=FLT_MAX |
1180 |
glib_md=DBL_MIN glib_Md=DBL_MAX |
1179 |
glib_md=DBL_MIN glib_Md=DBL_MAX |
1181 |
;; |
1180 |
;; |
1182 |
x$ac_cv_header_values_h) |
1181 |
x$ac_cv_header_values_h) |
1183 |
glib_values_h=yes |
1182 |
glib_values_h="yes" |
1184 |
glib_mf=MINFLOAT glib_Mf=MAXFLOAT |
1183 |
glib_mf=MINFLOAT glib_Mf=MAXFLOAT |
1185 |
glib_md=MINDOUBLE glib_Md=MAXDOUBLE |
1184 |
glib_md=MINDOUBLE glib_Md=MAXDOUBLE |
1186 |
;; |
1185 |
;; |
1187 |
esac |
1186 |
esac |
1188 |
|
1187 |
|
1189 |
case xyes in |
1188 |
case "xyes" in |
1190 |
x$ac_cv_header_limits_h) |
1189 |
x$ac_cv_header_limits_h) |
1191 |
glib_limits_h=yes |
1190 |
glib_limits_h="yes" |
1192 |
glib_ms=SHRT_MIN glib_Ms=SHRT_MAX |
1191 |
glib_ms=SHRT_MIN glib_Ms=SHRT_MAX |
1193 |
glib_mi=INT_MIN glib_Mi=INT_MAX |
1192 |
glib_mi=INT_MIN glib_Mi=INT_MAX |
1194 |
glib_ml=LONG_MIN glib_Ml=LONG_MAX |
1193 |
glib_ml=LONG_MIN glib_Ml=LONG_MAX |
1195 |
;; |
1194 |
;; |
1196 |
x$ac_cv_header_values_h) |
1195 |
x$ac_cv_header_values_h) |
1197 |
glib_values_h=yes |
1196 |
glib_values_h="yes" |
1198 |
glib_ms=MINSHORT glib_Ms=MAXSHORT |
1197 |
glib_ms=MINSHORT glib_Ms=MAXSHORT |
1199 |
glib_mi=MININT glib_Mi=MAXINT |
1198 |
glib_mi=MININT glib_Mi=MAXINT |
1200 |
glib_ml=MINLONG glib_Ml=MAXLONG |
1199 |
glib_ml=MINLONG glib_Ml=MAXLONG |
1201 |
;; |
1200 |
;; |
1202 |
esac |
1201 |
esac |
1203 |
|
1202 |
|
1204 |
if test x$ac_cv_header_sys_poll_h = xyes ; then |
1203 |
if test "x$ac_cv_header_sys_poll_h" = "xyes" ; then |
1205 |
glib_sys_poll_h=yes |
1204 |
glib_sys_poll_h="yes" |
1206 |
fi |
1205 |
fi |
1207 |
|
1206 |
|
1208 |
case 2 in |
1207 |
case 2 in |
1209 |
$ac_cv_sizeof_short) gint16=short;; |
1208 |
$ac_cv_sizeof_short) gint16="short";; |
1210 |
$ac_cv_sizeof_int) gint16=int;; |
1209 |
$ac_cv_sizeof_int) gint16="int";; |
1211 |
esac |
1210 |
esac |
1212 |
case 4 in |
1211 |
case 4 in |
1213 |
$ac_cv_sizeof_short) gint32=short;; |
1212 |
$ac_cv_sizeof_short) gint32="short";; |
1214 |
$ac_cv_sizeof_int) gint32=int;; |
1213 |
$ac_cv_sizeof_int) gint32="int";; |
1215 |
$ac_cv_sizeof_long) gint32=long;; |
1214 |
$ac_cv_sizeof_long) gint32="long";; |
1216 |
esac |
1215 |
esac |
1217 |
case 8 in |
1216 |
case 8 in |
1218 |
$ac_cv_sizeof_int) |
1217 |
$ac_cv_sizeof_int) |
1219 |
gint64=int |
1218 |
gint64="int" |
1220 |
glib_extension= |
1219 |
glib_extension= |
1221 |
glib_warning_guard= |
1220 |
glib_warning_guard= |
1222 |
gint64_constant='(val)' |
1221 |
gint64_constant='(val)' |
1223 |
;; |
1222 |
;; |
1224 |
$ac_cv_sizeof_long) |
1223 |
$ac_cv_sizeof_long) |
1225 |
gint64=long |
1224 |
gint64="long" |
1226 |
glib_extension= |
1225 |
glib_extension= |
1227 |
glib_warning_guard= |
1226 |
glib_warning_guard= |
1228 |
gint64_constant='(val##L)' |
1227 |
gint64_constant='(val##L)' |
Lines 1235-1243
Link Here
|
1235 |
# define G_GNUC_EXTENSION __extension__ |
1234 |
# define G_GNUC_EXTENSION __extension__ |
1236 |
#else |
1235 |
#else |
1237 |
# define G_GNUC_EXTENSION |
1236 |
# define G_GNUC_EXTENSION |
1238 |
#endif |
1237 |
#endif" |
1239 |
|
|
|
1240 |
" |
1241 |
gint64_constant='(G_GNUC_EXTENSION (val##LL))' |
1238 |
gint64_constant='(G_GNUC_EXTENSION (val##LL))' |
1242 |
;; |
1239 |
;; |
1243 |
esac |
1240 |
esac |
Lines 1249-1259
Link Here
|
1249 |
case $ac_cv_sizeof_void_p in |
1246 |
case $ac_cv_sizeof_void_p in |
1250 |
$ac_cv_sizeof_int) glib_gpi_cast='' glib_gpui_cast='' ;; |
1247 |
$ac_cv_sizeof_int) glib_gpi_cast='' glib_gpui_cast='' ;; |
1251 |
$ac_cv_sizeof_long) glib_gpi_cast='(glong)' glib_gpui_cast='(gulong)' ;; |
1248 |
$ac_cv_sizeof_long) glib_gpi_cast='(glong)' glib_gpui_cast='(gulong)' ;; |
1252 |
*) glib_unknown_void_p=yes ;; |
1249 |
*) glib_unknown_void_p="yes" ;; |
1253 |
esac |
1250 |
esac |
1254 |
|
1251 |
|
1255 |
|
1252 |
|
1256 |
case xyes in |
1253 |
case "xyes" in |
1257 |
x$ac_cv_func_atexit) |
1254 |
x$ac_cv_func_atexit) |
1258 |
glib_atexit=" |
1255 |
glib_atexit=" |
1259 |
#ifdef NeXT /* @#%@! NeXTStep */ |
1256 |
#ifdef NeXT /* @#%@! NeXTStep */ |
Lines 1263-1277
Link Here
|
1263 |
#endif" |
1260 |
#endif" |
1264 |
;; |
1261 |
;; |
1265 |
x$ac_cv_func_on_exit) |
1262 |
x$ac_cv_func_on_exit) |
1266 |
glib_atexit=" |
1263 |
glib_atexit="#define g_ATEXIT(proc) (on_exit ((void (*)(int, void*))(proc), NULL))" |
1267 |
#define g_ATEXIT(proc) (on_exit ((void (*)(int, void*))(proc), NULL))" |
|
|
1268 |
;; |
1264 |
;; |
1269 |
esac |
1265 |
esac |
1270 |
|
1266 |
|
1271 |
case xyes in |
1267 |
case "xyes" in |
1272 |
x$ac_cv_func_memmove) |
1268 |
x$ac_cv_func_memmove) |
1273 |
glib_memmove=' |
1269 |
glib_memmove="#define g_memmove(d,s,n) G_STMT_START { memmove ((d), (s), (n)); } G_STMT_END" |
1274 |
#define g_memmove(d,s,n) G_STMT_START { memmove ((d), (s), (n)); } G_STMT_END' |
|
|
1275 |
;; |
1270 |
;; |
1276 |
*) |
1271 |
*) |
1277 |
glib_memmove=" |
1272 |
glib_memmove=" |
Lines 1288-1317
Link Here
|
1288 |
#define GLIB_MICRO_VERSION $GLIB_MICRO_VERSION |
1283 |
#define GLIB_MICRO_VERSION $GLIB_MICRO_VERSION |
1289 |
" |
1284 |
" |
1290 |
|
1285 |
|
1291 |
case xyes in |
1286 |
case "xyes" in |
1292 |
x$glib_cv_va_copy) glib_vacopy='#define G_VA_COPY va_copy' ;; |
1287 |
x$glib_cv_va_copy) glib_vacopy="#define G_VA_COPY va_copy" ;; |
1293 |
x$glib_cv___va_copy) glib_vacopy='#define G_VA_COPY __va_copy' ;; |
1288 |
x$glib_cv___va_copy) glib_vacopy="#define G_VA_COPY __va_copy" ;; |
1294 |
*) glib_vacopy='' |
1289 |
*) glib_vacopy="" |
1295 |
esac |
1290 |
esac |
1296 |
|
1291 |
|
1297 |
if test x$glib_cv_va_val_copy = xno; then |
1292 |
if test "x$glib_cv_va_val_copy" = "xno"; then |
1298 |
glib_vacopy="\$glib_vacopy |
1293 |
glib_vacopy="\$glib_vacopy |
1299 |
#define G_VA_COPY_AS_ARRAY 1" |
1294 |
#define G_VA_COPY_AS_ARRAY 1" |
1300 |
fi |
1295 |
fi |
1301 |
|
1296 |
|
1302 |
if test x$glib_cv_hasinline = xyes; then |
1297 |
if test "x$glib_cv_hasinline" = "xyes"; then |
1303 |
glib_inline='#define G_HAVE_INLINE 1' |
1298 |
glib_inline="#define G_HAVE_INLINE 1" |
1304 |
fi |
1299 |
fi |
1305 |
if test x$glib_cv_has__inline = xyes; then |
1300 |
if test "x$glib_cv_has__inline" = "xyes"; then |
1306 |
glib_inline="\$glib_inline |
1301 |
glib_inline="\$glib_inline |
1307 |
#define G_HAVE___INLINE 1" |
1302 |
#define G_HAVE___INLINE 1" |
1308 |
fi |
1303 |
fi |
1309 |
if test x$glib_cv_has__inline__ = xyes; then |
1304 |
if test "x$glib_cv_has__inline__" = "xyes"; then |
1310 |
glib_inline="\$glib_inline |
1305 |
glib_inline="\$glib_inline |
1311 |
#define G_HAVE___INLINE__ 1" |
1306 |
#define G_HAVE___INLINE__ 1" |
1312 |
fi |
1307 |
fi |
1313 |
|
1308 |
|
1314 |
case xyes in |
1309 |
case "xyes" in |
1315 |
x$ac_cv_c_bigendian) |
1310 |
x$ac_cv_c_bigendian) |
1316 |
g_byte_order=G_BIG_ENDIAN |
1311 |
g_byte_order=G_BIG_ENDIAN |
1317 |
g_bs_native=BE |
1312 |
g_bs_native=BE |
Lines 1324-1355
Link Here
|
1324 |
;; |
1319 |
;; |
1325 |
esac |
1320 |
esac |
1326 |
|
1321 |
|
1327 |
if test x$glib_wchar_h = xyes; then |
1322 |
if test "x$glib_wchar_h" = "xyes"; then |
1328 |
glib_wc=' |
1323 |
glib_wc="#define G_HAVE_WCHAR_H 1" |
1329 |
#define G_HAVE_WCHAR_H 1' |
|
|
1330 |
fi |
1324 |
fi |
1331 |
if test x$glib_wctype_h = xyes; then |
1325 |
if test "x$glib_wctype_h" = "xyes"; then |
1332 |
glib_wc="\$glib_wc |
1326 |
glib_wc="\$glib_wc |
1333 |
#define G_HAVE_WCTYPE_H 1" |
1327 |
#define G_HAVE_WCTYPE_H 1" |
1334 |
fi |
1328 |
fi |
1335 |
if test x$glib_working_wctype = xno; then |
1329 |
if test "x$glib_working_wctype" = "xno"; then |
1336 |
glib_wc="\$glib_wc |
1330 |
glib_wc="\$glib_wc |
1337 |
#define G_HAVE_BROKEN_WCTYPE 1" |
1331 |
#define G_HAVE_BROKEN_WCTYPE 1" |
1338 |
fi |
1332 |
fi |
1339 |
|
1333 |
|
1340 |
case x$enable_threads in |
1334 |
case "x$enable_threads" in |
1341 |
xyes) g_enable_threads_def="#define";; |
1335 |
xyes) g_enable_threads_def="#define";; |
1342 |
*) g_enable_threads_def="#undef ";; |
1336 |
*) g_enable_threads_def="#undef ";; |
1343 |
esac |
1337 |
esac |
1344 |
|
1338 |
|
1345 |
g_threads_impl_def=$g_threads_impl |
1339 |
g_threads_impl_def="$g_threads_impl" |
|
|
1340 |
|
1346 |
|
1341 |
|
1347 |
g_mutex_has_default="$mutex_has_default" |
1342 |
g_mutex_has_default="$mutex_has_default" |
1348 |
g_mutex_sizeof="$glib_cv_sizeof_gmutex" |
1343 |
g_mutex_sizeof="$glib_cv_sizeof_gmutex" |
1349 |
g_mutex_contents="$glib_cv_byte_contents_gmutex" |
1344 |
g_mutex_contents="$glib_cv_byte_contents_gmutex" |
1350 |
]) |
1345 |
]) |
1351 |
|
1346 |
|
1352 |
AC_OUTPUT([ |
1347 |
AC_CONFIG_FILES([ |
1353 |
glib.spec |
1348 |
glib.spec |
1354 |
Makefile |
1349 |
Makefile |
1355 |
glib-config |
1350 |
glib-config |
Lines 1362-1367
Link Here
|
1362 |
glib.pc |
1357 |
glib.pc |
1363 |
gmodule.pc |
1358 |
gmodule.pc |
1364 |
gthread.pc |
1359 |
gthread.pc |
1365 |
],[case "$CONFIG_FILES" in |
1360 |
]) |
|
|
1361 |
AC_CONFIG_COMMANDS([chmod-scripts],[ |
1362 |
case "$CONFIG_FILES" in |
1366 |
*glib-config*)chmod +x glib-config;; |
1363 |
*glib-config*)chmod +x glib-config;; |
1367 |
esac]) |
1364 |
esac]) |
|
|
1365 |
AC_OUTPUT |