summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2011-10-25 10:21:51 +0200
committerMurray Cumming <murrayc@murrayc.com>2011-10-25 10:21:51 +0200
commitd195d3b82a9cf5acef2c8ae3c6ce0907c5f61059 (patch)
tree1fe13baf1bf803d916005190dd07bce2c2e39f97
parent327c2f61705e52d419da86e30d0ae91aaaedd25d (diff)
downloadglibmm-d195d3b82a9cf5acef2c8ae3c6ce0907c5f61059.tar.gz
Fix the make check build by always linking to gthread-2.0.
* configure.ac: Always use gthread-2.0 because there is now no advantage to not doing that, because threading is now always enabled in glib. Remove the separate GTHREAD* variables. * glib/glibmm/Makefile.am: * gio/giomm/Makefile.am: * tests/Makefile.am: * tools/Makefile.am: * examples/Makefile.am: Remove use of the GTHREAD* variables.. * examples/network/resolver.cc: Remove the non-threading option and code that uses it.
-rw-r--r--ChangeLog15
-rw-r--r--configure.ac8
-rw-r--r--examples/Makefile.am4
-rw-r--r--examples/network/resolver.cc29
-rw-r--r--gio/giomm/Makefile.am2
-rw-r--r--glib/glibmm/Makefile.am2
-rw-r--r--tests/Makefile.am2
-rw-r--r--tools/Makefile.am2
8 files changed, 30 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c29b3bb..c4c715f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2011-10-25 Murray Cumming <murrayc@murrayc.com>
+ Fix the make check build by always linking to gthread-2.0.
+
+ * configure.ac: Always use gthread-2.0 because there is now no advantage to
+ not doing that, because threading is now always enabled in glib.
+ Remove the separate GTHREAD* variables.
+ * glib/glibmm/Makefile.am:
+ * gio/giomm/Makefile.am:
+ * tests/Makefile.am:
+ * tools/Makefile.am:
+ * examples/Makefile.am: Remove use of the GTHREAD* variables..
+ * examples/network/resolver.cc: Remove the non-threading option and code that
+ uses it.
+
+2011-10-25 Murray Cumming <murrayc@murrayc.com>
+
Regenerate enums defs.
* glib/src/glib_enums.defs, gobject_enums.defs: Regenerated with enums.pl.
diff --git a/configure.ac b/configure.ac
index e9003429..bc14eeb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,16 +62,16 @@ AS_IF([test "x$enable_static" = xyes],
glibreq='2.0 >= 2.30.0'
-GLIBMM_MODULES="sigc++-2.0 >= 2.0.10 glib-$glibreq gobject-$glibreq gmodule-$glibreq"
+# Note that we use gthread-2.0 only to link to deprecated API.
+# Note also that the deprecated g_thread_init() API does not actually do anything now,
+# and there is now no advantage to not linking to it by default.
+GLIBMM_MODULES="sigc++-2.0 >= 2.0.10 glib-$glibreq gobject-$glibreq gmodule-$glibreq gthread-$glibreq"
GIOMM_MODULES="$GLIBMM_MODULES gio-$glibreq"
test "x$glibmm_host_windows" = xyes || GIOMM_MODULES="$GIOMM_MODULES gio-unix-$glibreq"
PKG_CHECK_MODULES([GLIBMM], [$GLIBMM_MODULES])
PKG_CHECK_MODULES([GIOMM], [$GIOMM_MODULES])
-MM_PKG_CONFIG_SUBST([GTHREAD_CFLAGS], [--cflags-only-other gthread-2.0])
-MM_PKG_CONFIG_SUBST([GTHREAD_LIBS], [--libs gthread-2.0])
-
AC_CHECK_PROGS([M4], [gm4 m4], [m4])
GLIB_GSETTINGS
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 25e67141..e905b25a 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -42,7 +42,7 @@ glibmm_includes = -I$(top_builddir)/glib $(if $(srcdir:.=),-I$(top_srcdir)/glib)
giomm_includes = -I$(top_builddir)/gio $(if $(srcdir:.=),-I$(top_srcdir)/gio)
local_cppflags = -I$(top_builddir) $(glibmm_includes) $(giomm_includes)
-AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS)
+AM_CPPFLAGS = $(local_cppflags)
AM_CXXFLAGS = $(GIOMM_CFLAGS) $(GLIBMM_WXXFLAGS)
local_libglibmm = $(top_builddir)/glib/glibmm/libglibmm-$(GLIBMM_API_VERSION).la
@@ -50,7 +50,7 @@ local_libgiomm = $(top_builddir)/gio/giomm/libgiomm-$(GIOMM_API_VERSION).la
LDADD = $(GLIBMM_LIBS) $(local_libglibmm)
giomm_ldadd = $(GIOMM_LIBS) $(local_libglibmm) $(local_libgiomm)
-thread_ldadd = $(GTHREAD_LIBS) $(GLIBMM_LIBS) $(local_libglibmm)
+thread_ldadd = $(GLIBMM_LIBS) $(local_libglibmm)
child_watch_child_watch_SOURCES = child_watch/main.cc
iochannel_stream_example_SOURCES = \
diff --git a/examples/network/resolver.cc b/examples/network/resolver.cc
index 14c5984a..7ce8cef9 100644
--- a/examples/network/resolver.cc
+++ b/examples/network/resolver.cc
@@ -48,9 +48,7 @@ usage (void)
std::cerr
<< "Usage: resolver [-t] [-s] [hostname | IP | service/protocol/domain ] ...\n"
<< " resolver [-t] [-s] -c [hostname | IP | service/protocol/domain ]\n"
- << " Use -t to enable threading.\n"
<< " Use -s to do synchronous lookups.\n"
- << " Both together will result in simultaneous lookups in multiple threads\n"
<< " Use -c (and only a single resolvable argument) to test GSocketConnectable.\n";
exit (1);
}
@@ -220,15 +218,6 @@ start_threaded_lookups (char **argv, int argc)
}
static void
-start_sync_lookups (char **argv, int argc)
-{
- int i;
-
- for (i = 0; i < argc; i++)
- lookup_one_sync (argv[i]);
-}
-
-static void
lookup_by_addr_callback (Glib::RefPtr<Gio::AsyncResult> result,
const Glib::ustring& phys)
{
@@ -462,24 +451,17 @@ async_cancel (Glib::IOCondition /*cond*/, Glib::RefPtr<Gio::Cancellable> cancell
int
main (int argc, char **argv)
{
- bool threaded = false, synchronous = false;
+ bool synchronous = false;
bool use_connectable = false;
#ifdef G_OS_UNIX
Glib::RefPtr<Glib::IOChannel> chan;
sigc::connection watch_conn;
#endif
- /* We can't use Glib::OptionContext because we use the arguments to
- * decide whether or not to call g_thread_init().
- */
+ // TODO: Use Glib::OptionContext.
while (argc >= 2 && argv[1][0] == '-')
{
- if (!strcmp (argv[1], "-t"))
- {
- Glib::thread_init ();
- threaded = true;
- }
- else if (!strcmp (argv[1], "-s"))
+ if (!strcmp (argv[1], "-s"))
synchronous = true;
else if (!strcmp (argv[1], "-c"))
use_connectable = true;
@@ -489,6 +471,7 @@ main (int argc, char **argv)
argv++;
argc--;
}
+
Gio::init ();
if (argc < 2 || (argc > 2 && use_connectable))
@@ -524,10 +507,8 @@ main (int argc, char **argv)
do_connectable (argv[1], synchronous);
else
{
- if (threaded && synchronous)
+ if (synchronous)
start_threaded_lookups (argv + 1, argc - 1);
- else if (synchronous)
- start_sync_lookups (argv + 1, argc - 1);
else
start_async_lookups (argv + 1, argc - 1);
}
diff --git a/gio/giomm/Makefile.am b/gio/giomm/Makefile.am
index f88b28c3..b03256c5 100644
--- a/gio/giomm/Makefile.am
+++ b/gio/giomm/Makefile.am
@@ -34,7 +34,7 @@ dist_noinst_HEADERS = slot_async.h
local_includes = -I$(top_builddir)/glib $(if $(srcdir:.=),-I$(top_srcdir)/glib)
local_cppflags = $(binding_includes) $(local_includes) $(binding_cppflags) -DGIOMM_BUILD=1
-AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GIOMM_CFLAGS)
+AM_CPPFLAGS = $(local_cppflags) $(GIOMM_CFLAGS)
AM_CXXFLAGS = $(GLIBMM_WXXFLAGS)
local_libadd = $(top_builddir)/glib/glibmm/libglibmm-$(GLIBMM_API_VERSION).la
diff --git a/glib/glibmm/Makefile.am b/glib/glibmm/Makefile.am
index b721d203..2b6daa9d 100644
--- a/glib/glibmm/Makefile.am
+++ b/glib/glibmm/Makefile.am
@@ -31,7 +31,7 @@ include $(top_srcdir)/build/compile-binding.am
local_cppflags = $(binding_includes) $(binding_cppflags) -DGLIBMM_BUILD=1
-AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GLIBMM_CFLAGS)
+AM_CPPFLAGS = $(local_cppflags) $(GLIBMM_CFLAGS)
AM_CXXFLAGS = $(GLIBMM_WXXFLAGS)
libglibmm_@GLIBMM_API_VERSION@_la_SOURCES = $(binding_sources)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d887868f..10bc1ac4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -44,7 +44,7 @@ glibmm_includes = -I$(top_builddir)/glib $(if $(srcdir:.=),-I$(top_srcdir)/glib)
giomm_includes = -I$(top_builddir)/gio $(if $(srcdir:.=),-I$(top_srcdir)/gio)
local_cppflags = -I$(top_builddir) $(glibmm_includes) $(giomm_includes)
-AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GIOMM_CFLAGS)
+AM_CPPFLAGS = $(local_cppflags) $(GIOMM_CFLAGS)
AM_CXXFLAGS = $(GLIBMM_WXXFLAGS)
local_libglibmm = $(top_builddir)/glib/glibmm/libglibmm-$(GLIBMM_API_VERSION).la
diff --git a/tools/Makefile.am b/tools/Makefile.am
index d5d0dc4f..af53de8c 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -51,7 +51,7 @@ extra_defs_gen_generate_defs_glib_LDADD = $(GLIBMM_LIBS) $(lib_LTLIBRARIES)
extra_defs_gen_generate_defs_gio_SOURCES = extra_defs_gen/generate_defs_gio.cc
extra_defs_gen_generate_defs_gio_LDADD = $(GIOMM_LIBS) $(lib_LTLIBRARIES)
-AM_CPPFLAGS = -I$(top_builddir) $(GTHREAD_CFLAGS) $(GIOMM_CFLAGS)
+AM_CPPFLAGS = -I$(top_builddir) $(GIOMM_CFLAGS)
AM_CXXFLAGS = $(GLIBMM_WXXFLAGS)
EXTRA_DIST = defs_gen/definitions.py \