From a4d407fe4c739ec38ed0632c29067f91ee94f23f Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Sun, 20 Jan 2008 19:42:38 +0000 Subject: [PATCH] Only link tempget with needed libs. SVN revision: 33542 --- configure.in | 17 +++++++++++------ src/modules/Makefile.am | 5 ++++- src/modules/temperature/Makefile.am | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index f826fb201..755f29bc5 100644 --- a/configure.in +++ b/configure.in @@ -185,7 +185,6 @@ PKG_CHECK_MODULES(E, [ ecore-ipc ecore-con ecore-job - ecore-txt ecore-imf ecore-imf-evas edje @@ -195,11 +194,17 @@ PKG_CHECK_MODULES(E, [ efreet-mime ]) -# ecore-txt is really only needed by the temperature module, -# so we check for it separately. -# in a perfect world, we'd also disable the temperate module here -# if ecore-txt isn't available. -PKG_CHECK_MODULES(ECORE_TXT, ecore-txt) +PKG_CHECK_MODULES(ECORE_TXT, [ + ecore-txt +], [ + have_temp="yes" + # This test will succeed as these modules are also checked before + PKG_CHECK_MODULES(TEMPERATURE, [ + ecore + ecore-file + ]) +], [ have_temp="no"]) +AM_CONDITIONAL(HAVE_TEMPERATURE, test x$have_temp = "xyes") PKG_CHECK_MODULES(E_DBUS, edbus, have_edbus=yes, have_edbus=no) PKG_CHECK_MODULES(E_HAL, ehal, have_ehal=yes, have_ehal=no) diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am index e3f01df46..72b498f3d 100644 --- a/src/modules/Makefile.am +++ b/src/modules/Makefile.am @@ -5,7 +5,6 @@ dropshadow \ clock \ pager \ battery \ -temperature \ cpufreq \ ibox \ start \ @@ -51,3 +50,7 @@ conf_winlist \ conf_exebuf \ conf_paths \ conf_mime + +if HAVE_TEMPERATURE +SUBDIRS += temperature +endif diff --git a/src/modules/temperature/Makefile.am b/src/modules/temperature/Makefile.am index 5b375ec02..c9c7d2788 100644 --- a/src/modules/temperature/Makefile.am +++ b/src/modules/temperature/Makefile.am @@ -35,7 +35,7 @@ install-data-hook: noinst_PROGRAMS = tempget tempget_SOURCES = tempget.c -tempget_LDFLAGS = @e_libs@ +tempget_LDFLAGS = @TEMPERATURE_LIBS@ uninstall: rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)