configure.in patch for glib (new platform support)



I have the following small patch to glib/configure.in which will allow
it to detect the POSIX thread library on DG/UX (you get it with
-lthread, and there's some platform specific remapping of names).  I'll
deal with the specific pre-processor macro next (right now I'm setting
it in CFLAGS in the environment when running autogen.sh/configure.
It's -D_POSIX4A_DRAFT10_SOURCE, for anyone who cares).

I'd appreciate it if someone could check this in.

	Thanks,

	Marc

---


Index: glib/configure.in
===================================================================
RCS file: /cvs/gnome/glib/configure.in,v
retrieving revision 1.56
diff -c -r1.56 configure.in
*** glib/configure.in	1999/01/05 20:29:46	1.56
--- glib/configure.in	1999/01/11 15:20:56
***************
*** 587,592 ****
--- 587,595 ----
       	        AC_CHECK_LIB(pthreads, pthread_attr_init, have_threads=posix)
  	fi
          if test "x$have_threads" = xnone; then
+      	        AC_CHECK_LIB(thread, __d10_pthread_attr_init, have_threads=posix)
+ 	fi
+         if test "x$have_threads" = xnone; then
  		AC_CHECK_FUNC(pthread_attr_init, have_threads=posix)
  	fi
  fi
***************
*** 620,625 ****
--- 623,641 ----
  		if test "x$G_THREAD_LIBS" = xerror; then
                  	AC_CHECK_LIB(pthreads, pthread_attr_init,
  			     	G_THREAD_LIBS="-lpthreads")
+ 		fi
+ 
+ 		dnl FIXME
+ 		dnl This is kind of icky, but I'm at a loss for a better
+ 		dnl way at the moment.  DG/UX has two thread implementations,
+ 		dnl matching draft 6 and draft 10 of POSIX.4a.  A preprocessor
+ 		dnl define decides which one you use, and maps the function
+ 		dnl names appropriately.  The generic names don't actually
+ 		dnl exist.  If we could check the macro _first_, then we
+ 		dnl could use it here, and that might go better.
+ 		if test "x$G_THREAD_LIBS" = xerror; then
+                 	AC_CHECK_LIB(thread, __d10_pthread_attr_init,
+ 			     	G_THREAD_LIBS="-lthread")
  		fi
  		if test "x$G_THREAD_LIBS" = xerror; then
  			AC_CHECK_FUNC(pthread_attr_init, G_THREAD_LIBS="")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]