From 5d48c7c4ac5e158e89610d9f57008b20a1757d4f Mon Sep 17 00:00:00 2001
From: Eugene Rudoy <gene.devel@gmail.com>
Date: Sat, 6 Apr 2013 18:09:13 +0200
Subject: [PATCH] Check if GModule is required and do not link it in if not
(saves space on embedded systems)
---
configure.ac | 3 +++
lib/Makefile.am | 2 +-
lib/tty/Makefile.am | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2c35d06..ae6652d 100644
a
|
b
|
AM_CONDITIONAL(USE_DIFF, [test -n "$use_diff"]) |
495 | 495 | AM_CONDITIONAL(CHARSET, [test -n "$have_charset"]) |
496 | 496 | AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"]) |
497 | 497 | |
| 498 | # check if GModule is required and do not link it in if not (saves space on embedded systems) |
| 499 | AM_CONDITIONAL(HAVE_GMODULE_AND_GMODULE_REQUIRED, [test x"$g_module_supported" != x -a x"$enable_aspell" = xyes -a x"$textmode_x11_support" = xyes]) |
| 500 | |
498 | 501 | AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments]) |
499 | 502 | |
500 | 503 | AC_CONFIG_FILES( |
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 18bf836..26442aa 100644
a
|
b
|
libmc_la_LIBADD = \ |
65 | 65 | |
66 | 66 | libmc_la_LIBADD += $(MCLIBS) $(SLANGLIB) |
67 | 67 | |
68 | | if HAVE_GMODULE |
| 68 | if HAVE_GMODULE_AND_GMODULE_REQUIRED |
69 | 69 | libmc_la_LIBADD += $(GMODULE_LIBS) |
70 | 70 | else |
71 | 71 | libmc_la_LIBADD += $(GLIB_LIBS) |
diff --git a/lib/tty/Makefile.am b/lib/tty/Makefile.am
index 30ba305..cb5e898 100644
a
|
b
|
libmctty_la_SOURCES = $(TTY_SRC) $(TTY_SCREEN_SRC) |
27 | 27 | |
28 | 28 | AM_CPPFLAGS = -I$(top_srcdir) |
29 | 29 | |
30 | | if HAVE_GMODULE |
| 30 | if HAVE_GMODULE_AND_GMODULE_REQUIRED |
31 | 31 | AM_CPPFLAGS += $(GMODULE_CFLAGS) |
32 | 32 | else |
33 | 33 | AM_CPPFLAGS += $(GLIB_CFLAGS) |