Index: configure.in
===================================================================
RCS file: /cvs/gnome/glib/configure.in,v
retrieving revision 1.396
diff -u -r1.396 configure.in
--- configure.in	17 Mar 2004 19:07:37 -0000	1.396
+++ configure.in	2 May 2004 18:12:14 -0000
@@ -1062,6 +1062,9 @@
 	LIBS="$G_MODULE_LIBS $LIBS"
 	LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
 dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
+	echo "void glib_plugin_test(void) { }" > plugin.c
+	${SHELL} ./libtool --mode=compile ${CC} -shared \
+		-export-dynamic -o plugin.o plugin.c 2>&1 >/dev/null
 	AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
 		glib_cv_rtldglobal_broken,[
 		AC_TRY_RUN([
@@ -1072,19 +1075,20 @@
 #ifndef RTLD_LAZY
 #  define RTLD_LAZY 0
 #endif
-int pthread_create;
+int glib_plugin_test;
 int main () {
     void *handle, *global, *local;
-    global = &pthread_create;
-    handle = dlopen ("libpthread.so", RTLD_GLOBAL | RTLD_LAZY);
+    global = &glib_plugin_test;
+    handle = dlopen ("./.libs/plugin.o", RTLD_GLOBAL | RTLD_LAZY);
     if (!handle) return 0;
-    local = dlsym (handle, "pthread_create");
+    local = dlsym (handle, "glib_plugin_test");
     return global == local;
 }                       ],
 			[glib_cv_rtldglobal_broken=no],
 			[glib_cv_rtldglobal_broken=yes],
 			[glib_cv_rtldglobal_broken=no])
-		rm -f plugin.c plugin.o plugin.lo
+		rm -f plugin.c plugin.o plugin.lo .libs/plugin.o
+		rmdir .libs 2>/dev/null
 	])
 	if test "x$glib_cv_rtldglobal_broken" = "xyes"; then
   		G_MODULE_BROKEN_RTLD_GLOBAL=1
