3 --- configure.orig 2012-03-24 03:02:40.000000000 +0000
5 @@ -697,6 +697,7 @@ GIO
9 +G_MODULE_BROKEN_DLOPEN_NULL
10 G_MODULE_BROKEN_RTLD_GLOBAL
13 @@ -22442,8 +22443,8 @@ else
17 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether using Sun Studio C compiler" >&5
18 -$as_echo_n "checking whether using Sun Studio C compiler... " >&6; }
19 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether using Sun Studio C compiler visibilily" >&5
20 +$as_echo_n "checking whether using Sun Studio C compiler visibilily... " >&6; }
21 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23 #if defined(__SUNPRO_C) || (__SUNPRO_C >= 0x550)
24 @@ -24038,16 +24039,48 @@ fi
28 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether using Sun Studio C compiler with C99" >&5
29 +$as_echo_n "checking whether using Sun Studio C compiler with C99... " >&6; }
30 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31 +/* end confdefs.h. */
32 +#if defined(__STDC_VERSION__) || (__STDC_VERSION__ - 0 >= 199901L)
34 +# include "error: this is STD C99."
45 +if ac_fn_c_try_compile "$LINENO"; then :
46 + g_have_sunstudio_c99=yes
48 + g_have_sunstudio_c99=no
50 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $g_have_sunstudio_c99" >&5
52 +$as_echo "$g_have_sunstudio_c99" >&6; }
53 + if test $g_have_sunstudio_c99 = yes; then
55 +$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
59 $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
62 $as_echo "#define _XOPEN_SOURCE 2" >>confdefs.h
67 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
73 if test "$ac_cv_func_statfs" = yes ; then
74 @@ -25040,10 +25073,11 @@ if test x"$glib_native_win32" = xyes; th
78 - G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
79 + G_MODULE_LDFLAGS=`(libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
81 G_MODULE_NEED_USCORE=0
82 G_MODULE_BROKEN_RTLD_GLOBAL=0
83 +G_MODULE_BROKEN_DLOPEN_NULL=0
84 G_MODULE_HAVE_DLERROR=0
85 if test -z "$G_MODULE_IMPL"; then
87 @@ -25250,13 +25284,13 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMP
88 LIBS="$G_MODULE_LIBS $LIBS"
89 LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
90 echo "void glib_plugin_test(void) { }" > plugin.c
91 - ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
92 + ${SHELL} libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
93 ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1
94 - ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
95 + ${SHELL} libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
96 ${LDFLAGS} -module -o plugin.la -export-dynamic \
97 -shrext ".o" -avoid-version plugin.lo \
98 -rpath /dont/care >/dev/null 2>&1
99 - eval `./libtool --config | grep ^objdir`
100 + eval `libtool --config | grep ^objdir`
101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTLD_GLOBAL brokenness" >&5
102 $as_echo_n "checking for RTLD_GLOBAL brokenness... " >&6; }
103 if ${glib_cv_rtldglobal_broken+:} false; then :
104 @@ -25365,6 +25399,56 @@ fi
108 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen(NULL, 0) brokenness" >&5
109 +$as_echo_n "checking for dlopen(NULL, 0) brokenness... " >&6; }
110 +if test "${glib_cv_dlopennull_broken+set}" = set; then :
111 + $as_echo_n "(cached) " >&6
114 + if test "$cross_compiling" = yes; then :
115 + glib_cv_dlopennull_broken=no
117 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
118 +/* end confdefs.h. */
123 +# define RTLD_GLOBAL 0
126 +# define RTLD_LAZY 0
131 + handle = dlopen ("libm.so", RTLD_GLOBAL | RTLD_LAZY);
132 + if (!handle) return 0;
133 + handle = dlopen (NULL, 0);
134 + if (!handle) return 0;
135 + handle = dlsym (handle, "sin");
136 + return handle == NULL;
140 +if ac_fn_c_try_run "$LINENO"; then :
141 + glib_cv_dlopennull_broken=no
143 + glib_cv_dlopennull_broken=yes
145 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
146 + conftest.$ac_objext conftest.beam conftest.$ac_ext
151 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glib_cv_dlopennull_broken" >&5
152 +$as_echo "$glib_cv_dlopennull_broken" >&6; }
153 + if test "x$glib_cv_dlopennull_broken" = "xyes"; then
154 + G_MODULE_BROKEN_DLOPEN_NULL=1
156 + G_MODULE_BROKEN_DLOPEN_NULL=0
158 if test -z "$G_MODULE_IMPL"; then
160 G_MODULE_SUPPORTED=false
161 @@ -25375,7 +25459,7 @@ fi
162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the suffix of module shared libraries" >&5
163 $as_echo_n "checking for the suffix of module shared libraries... " >&6; }
165 -shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
166 +shrext_cmds=`libtool --config | grep '^shrext_cmds='`
168 module=yes eval std_shrext=$shrext_cmds
169 # chop the initial dot
170 @@ -25399,6 +25483,8 @@ fi
176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gspawn implementation" >&5
177 $as_echo_n "checking for gspawn implementation... " >&6; }
179 @@ -26147,62 +26233,6 @@ if test x"$have_threads" = xposix; then
180 G_THREAD_LIBS="-lpthread -lthread"
183 - for flag in pthread pthreads mt; do
184 - glib_save_CFLAGS="$CFLAGS"
185 - CFLAGS="$CFLAGS -$flag"
186 - if test "$cross_compiling" = yes; then :
187 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
188 -/* end confdefs.h. */
190 -#include <pthread.h>
192 -void* func(void* data) {check_me = 42; return &check_me;}
196 - pthread_create (&t, 0, func, 0);
197 - pthread_join (t, &ret);
198 - return (check_me != 42 || ret != &check_me);
201 -if ac_fn_c_try_link "$LINENO"; then :
202 - glib_flag_works=yes
206 -rm -f core conftest.err conftest.$ac_objext \
207 - conftest$ac_exeext conftest.$ac_ext
209 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
210 -/* end confdefs.h. */
212 -#include <pthread.h>
214 -void* func(void* data) {check_me = 42; return &check_me;}
218 - pthread_create (&t, 0, func, 0);
219 - pthread_join (t, &ret);
220 - return (check_me != 42 || ret != &check_me);
223 -if ac_fn_c_try_run "$LINENO"; then :
224 - glib_flag_works=yes
228 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
229 - conftest.$ac_objext conftest.beam conftest.$ac_ext
232 - CFLAGS="$glib_save_CFLAGS"
233 - if test $glib_flag_works = yes ; then
234 - G_THREAD_CFLAGS=-$flag
235 - G_THREAD_LIBS=-$flag