aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>2000-02-11 08:43:23 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-02-11 08:43:23 +0800
commit784c1184a8d73c23f6462997da00e354297fdf78 (patch)
treee4a1e5d7c64da8b50fe58926d334604a1bc9b329
parent11a8bba27ea6fd7dc37b478be03831ddc561f28a (diff)
downloadgsoc2013-evolution-784c1184a8d73c23f6462997da00e354297fdf78.tar
gsoc2013-evolution-784c1184a8d73c23f6462997da00e354297fdf78.tar.gz
gsoc2013-evolution-784c1184a8d73c23f6462997da00e354297fdf78.tar.bz2
gsoc2013-evolution-784c1184a8d73c23f6462997da00e354297fdf78.tar.lz
gsoc2013-evolution-784c1184a8d73c23f6462997da00e354297fdf78.tar.xz
gsoc2013-evolution-784c1184a8d73c23f6462997da00e354297fdf78.tar.zst
gsoc2013-evolution-784c1184a8d73c23f6462997da00e354297fdf78.zip
don't build thread related tests if evolution has been compiled with no
2000-02-10 bertrand <Bertrand.Guiheneuf@aful.org> * tests/Makefile.am (THREAD_RELATED_TESTS): don't build thread related tests if evolution has been compiled with no thread support. * configure.in (have_pthread): allow user to enable/disable thread support at configure time (EXTRA_GNOME_CFLAGS): (EXTRA_GNOME_LIBS): thread support is directly included in this variable if enabled. No more EXTRA_GNOME_CFLAGS_THREADS Other special support should be added in EXTRA_GNOME_LIBS and EXTRA_GNOME_CFLAGS instead of redefining a new variable each time we want to add a new lib. (bonobo, ....) * camel/camel.c (camel_init): only try to initialize threads if we enabled threads support. * tests/ui-tests/Makefile.am (message_browser_LDADD): use EXTRA_GNOME_LIBS * configure.in (have_pthread): remove HAVE_PTHREADS variable. Define ENABLE_THREADS instead. * camel/Makefile.am: use ENABLE_THREADS not HAVE_PTHREADS to test if we build thread relateed code. * tests/Makefile.am: use EXTRA_GNOME_LIBS, not EXTRA_GNOME_LIBS_THREADS I need to be able to disable thread support to use Insure. svn path=/trunk/; revision=1725
-rw-r--r--ChangeLog33
-rw-r--r--acconfig.h1
-rw-r--r--camel/Makefile.am2
-rw-r--r--camel/camel.c4
-rw-r--r--configure.in32
-rw-r--r--tests/Makefile.am14
-rw-r--r--tests/ui-tests/Makefile.am11
7 files changed, 82 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 61ea4aa6da..2097be8976 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2000-02-10 bertrand <Bertrand.Guiheneuf@aful.org>
+
+ * tests/Makefile.am (THREAD_RELATED_TESTS): don't
+ build thread related tests if evolution has been
+ compiled with no thread support.
+
+ * configure.in (have_pthread): allow user to enable/disable
+ thread support at configure time
+ (EXTRA_GNOME_CFLAGS):
+ (EXTRA_GNOME_LIBS): thread support is directly
+ included in this variable if enabled. No more
+ EXTRA_GNOME_CFLAGS_THREADS
+ Other special support should be added in
+ EXTRA_GNOME_LIBS and EXTRA_GNOME_CFLAGS
+ instead of redefining a new variable
+ each time we want to add a new lib.
+ (bonobo, ....)
+
+ * camel/camel.c (camel_init): only try to initialize threads if
+ we enabled threads support.
+
+ * tests/ui-tests/Makefile.am (message_browser_LDADD): use
+ EXTRA_GNOME_LIBS
+
+ * configure.in (have_pthread): remove HAVE_PTHREADS
+ variable. Define ENABLE_THREADS instead.
+
+ * camel/Makefile.am: use ENABLE_THREADS not HAVE_PTHREADS
+ to test if we build thread relateed code.
+
+ * tests/Makefile.am: use EXTRA_GNOME_LIBS,
+ not EXTRA_GNOME_LIBS_THREADS
+
2000-02-10 NotZed <notzed@zedzone.helixcode.com>
* camel/hash-table-utils.c (g_strcase_hash): Removed a bizarre
diff --git a/acconfig.h b/acconfig.h
index 4ac725695e..0a5755ffc0 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -8,6 +8,7 @@
#undef VERSION
#undef HAVE_BONOBO
#undef CAMEL_HARD_LOG_LEVEL
+#undef ENABLE_THREADS
/* Define this if you want to build against the development gtk */
#undef HAVE_DEVGTK
diff --git a/camel/Makefile.am b/camel/Makefile.am
index 2003a951e6..2db0ecf42c 100644
--- a/camel/Makefile.am
+++ b/camel/Makefile.am
@@ -12,7 +12,7 @@ INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \
$(GTK_INCLUDEDIR)
-if HAVE_PTHREAD
+if ENABLE_THREADS
pthread_SRC = \
camel-folder-pt-proxy.c \
diff --git a/camel/camel.c b/camel/camel.c
index 2bb3dc163f..febdb2d2bb 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -29,11 +29,15 @@
gint
camel_init()
{
+
+
+#ifdef ENABLE_THREADS
#ifdef G_THREADS_ENABLED
g_thread_init (NULL);
#else /* G_THREADS_ENABLED */
printf ("Threads are not supported by your version of glib\n");
#endif /* G_THREADS_ENABLED */
+#endif /* ENABLE_THREADS */
return data_wrapper_repository_init ();
}
diff --git a/configure.in b/configure.in
index c76f3fd07d..3606f7c29a 100644
--- a/configure.in
+++ b/configure.in
@@ -42,17 +42,25 @@ AM_GNOME_GETTEXT
GNOME_X_CHECKS
+
+
dnl **************************************************
dnl * Posix thread support
dnl **************************************************
-GNOME_PTHREAD_CHECK
+
+have_pthread=false
+
+AC_ARG_WITH(threads, [--with-threads inculde threads support],
+ [GNOME_PTHREAD_CHECK])
+
if test "x$PTHREAD_LIB" = "x" ; then
have_pthread=false
else
have_pthread=true
fi
-AM_CONDITIONAL(HAVE_PTHREAD, $have_pthread)
+AM_CONDITIONAL(ENABLE_THREADS, $have_pthread)
+
dnl **************************************************
dnl * Print check
@@ -108,11 +116,22 @@ else
AC_MSG_ERROR(Did not find gdkpixbuf installed)
fi
-EXTRA_GNOME_LIBS="`gnome-config --libs gnomeui libglade gdk_pixbuf gnomecanvaspixbuf `"
-EXTRA_GNOME_CFLAGS="`gnome-config --cflags gnomeui libglade gdk_pixbuf gnomecanvaspixbuf `"
+if $have_pthread; then
+ THREADS_LIBS="$(PTHREAD_LIB) `glib-config --libs gthread`"
+ THREADS_CFLAGS="`glib-config --cflags gthread`"
+else
+ THREADS_LIBS=""
+ THREADS_CFLAGS=""
+fi
+
+EXTRA_GNOME_LIBS="`gnome-config --libs gnomeui libglade gdk_pixbuf gnomecanvaspixbuf ` $THREADS_LIBS"
+EXTRA_GNOME_CFLAGS="`gnome-config --cflags gnomeui libglade gdk_pixbuf gnomecanvaspixbuf ` $THREADS_CFLAGS"
+
+
AC_SUBST(EXTRA_GNOME_LIBS)
AC_SUBST(EXTRA_GNOME_CFLAGS)
+
BONOBO_GNOME_LIBS="`gnome-config --libs gnomeui bonobo libglade gdk_pixbuf gnomecanvaspixbuf `"
BONOBO_GNOME_CFLAGS="`gnome-config --cflags gnomeui bonobo libglade gdk_pixbuf gnomecanvaspixbuf `"
AC_SUBST(BONOBO_GNOME_LIBS)
@@ -123,10 +142,7 @@ BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags gnomeui bonobo libglade gdk_pix
AC_SUBST(BONOBO_HTML_GNOME_LIBS)
AC_SUBST(BONOBO_HTML_GNOME_CFLAGS)
-EXTRA_GNOME_LIBS_THREADS="`gnome-config --libs gnomeui libglade gdk_pixbuf gnomecanvaspixbuf ` `glib-config --libs gthread`"
-EXTRA_GNOME_CFLAGS_THREADS="`gnome-config --cflags gnomeui libglade gdk_pixbuf gnomecanvaspixbuf ` `glib-config --cflags gthread`"
-AC_SUBST(EXTRA_GNOME_LIBS_THREADS)
-AC_SUBST(EXTRA_GNOME_CFLAGS_THREADS)
+
BONOBO_VFS_GNOME_LIBS="`gnome-config --libs gnomeui bonobo libglade gdk_pixbuf gnomecanvaspixbuf vfs `"
BONOBO_VFS_GNOME_CFLAGS="`gnome-config --cflags gnomeui bonobo libglade gdk_pixbuf gnomecanvaspixbuf vfs `"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7f5873ea53..441837288d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -6,7 +6,7 @@ INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \
LDADD = \
$(top_builddir)/camel/libcamel.la \
$(GNOME_LIBDIR) \
- $(GNOMEUI_LIBS) $(INTLLIBS) $(PTHREAD_LIB) $(EXTRA_GNOME_LIBS_THREADS)
+ $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS)
# $(BONOBO_LIBS)
@@ -22,7 +22,13 @@ test9_LDADD = \
$(top_builddir)/camel/libcamel.la \
$(top_builddir)/camel/providers/mbox/libcamelmbox.la \
$(GNOME_LIBDIR) \
- $(GNOMEUI_LIBS) $(INTLLIBS) $(PTHREAD_LIB) $(EXTRA_GNOME_LIBS_THREADS)
+ $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS)
+
+if ENABLE_THREADS
+THREAD_RELATED_TESTS=test8
+else
+THREAD_RELATED_TESTS=
+endif
noinst_PROGRAMS = \
@@ -30,7 +36,7 @@ noinst_PROGRAMS = \
test2 \
test3 \
test7 \
- test8 \
test9 \
test10 \
- test-formatter
+ test-formatter \
+ $(THREAD_RELATED_TESTS)
diff --git a/tests/ui-tests/Makefile.am b/tests/ui-tests/Makefile.am
index 34c05f3115..b81b0e8f0d 100644
--- a/tests/ui-tests/Makefile.am
+++ b/tests/ui-tests/Makefile.am
@@ -20,7 +20,14 @@ message_browser_LDADD = \
$(INTLLIBS) \
$(EXTRA_GNOME_LIBS) \
$(PTHREAD_LIB) \
- $(EXTRA_GNOME_LIBS_THREADS)
+ $(EXTRA_GNOME_LIBS)
+
+camelfilter_LDADD = \
+ $(top_builddir)/camel/libcamel.la \
+ $(INTLLIBS) \
+ $(EXTRA_GNOME_LIBS) \
+ $(PTHREAD_LIB) \
+ $(EXTRA_GNOME_LIBS)
noinst_PROGRAMS = \
- message-browser
+ message-browser camelfilter