fixed gthread detection
authorVladimir Nadvornik <nadvornik@suse.cz>
Sun, 25 Jan 2009 16:58:19 +0000 (16:58 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Sun, 25 Jan 2009 16:58:19 +0000 (16:58 +0000)
configure.in

index 6e3b17a..b0b7fcb 100644 (file)
@@ -177,18 +177,14 @@ fi
 AM_PATH_GLIB_2_0(2.4.0,,AC_MSG_ERROR(GLIB >= 2.4.0 not installed.))
 AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR(GTK+ >= 2.4.0 not installed.))
 
-have_gthread="no"
+threads="auto"
 AC_ARG_ENABLE([threads],
-  AC_HELP_STRING([--disable-threads], [disable thread support]),
-[
-if test "x${enableval}" != "xno"; then
+  AC_HELP_STRING([--disable-threads], [disable thread support]), [threads="${enableval}"])
+
+have_gthread="no"
+if test "x${threads}" != "xno" ; then
   PKG_CHECK_MODULES(GTHREAD, [gthread-2.0], have_gthread="yes", [AC_MSG_WARN("No thread support in glib")])
 fi
-], 
-dnl enable by default
-  PKG_CHECK_MODULES(GTHREAD, [gthread-2.0], have_gthread="yes", [AC_MSG_WARN("No thread support in glib")])
-)
-
 
 if test "x$have_gthread" != "xno"; then
         AC_DEFINE(HAVE_GTHREAD, 1, Define if you have gthread library)