diff configure.in @ 58820:209a5436a8b4

* configure.in: If $HAVE_GTK_FILE_CHOOSER = yes, check for pthreads and define HAVE_GTK_AND_PTHREAD. * configure: Regenerate.
author Jan Djärv <jan.h.d@swipnet.se>
date Tue, 07 Dec 2004 08:29:07 +0000
parents 66817306c030
children c85be9a6f1d2
line wrap: on
line diff
--- a/configure.in	Tue Dec 07 08:28:17 2004 +0000
+++ b/configure.in	Tue Dec 07 08:29:07 2004 +0000
@@ -1994,6 +1994,21 @@
     AC_DEFINE(HAVE_GTK_FILE_BOTH, 1,
               [Define to 1 if GTK has both file selection and chooser dialog.])
   fi
+
+  dnl Check if pthreads are available.  Emacs only needs this when using
+  dnl gtk_file_chooser under Gnome.
+  if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
+    HAVE_GTK_AND_PTHREAD=no
+    AC_CHECK_HEADERS(pthread.h)
+    if test "$ac_cv_header_pthread_h"; then
+      AC_CHECK_LIB(pthread, pthread_self, HAVE_GTK_AND_PTHREAD=yes)
+    fi
+    if test "$HAVE_GTK_AND_PTHREAD" = yes; then
+      GTK_LIBS="$GTK_LIBS -lpthread"
+      AC_DEFINE(HAVE_GTK_AND_PTHREAD, 1,
+               [Define to 1 if you have GTK and pthread (-lpthread).])
+    fi
+  fi
 fi
 
 dnl Do not put whitespace before the #include statements below.