aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-04-19 13:39:02 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-04-19 13:43:52 +0100
commitde265a994ac7e32f4b543df28798a793a7be1bef (patch)
treeb6769c2d44068e0e9c802c333dd6d68b3fdf0476
parentecore_audio: Fix possible memory leak in pulse main loop integration (diff)
downloadefl-de265a994ac7e32f4b543df28798a793a7be1bef.tar.gz
ecore_audio: Make efl compile with PA disabled again
Now instead of having ifdefs in the .c files we just don't compile the ones we don't need. Much cleaner. Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
-rw-r--r--configure.ac3
-rw-r--r--src/Makefile_Ecore_Audio.am26
2 files changed, 22 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index b12d5e3438..9a31d50fe8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2442,6 +2442,9 @@ EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_alsa}], [ALSA], [alsa])
EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_pulseaudio}], [PULSE], [libpulse])
EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_sndfile}], [SNDFILE], [sndfile])
+AM_CONDITIONAL([HAVE_ECORE_AUDIO_PULSE], [test "${want_pulseaudio}" = "yes"])
+AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test "${want_sndfile}" = "yes"])
+
EFL_EVAL_PKGS([ECORE_AUDIO])
EFL_ADD_FEATURE([ECORE_AUDIO], [alsa])
diff --git a/src/Makefile_Ecore_Audio.am b/src/Makefile_Ecore_Audio.am
index ded4d35785..06a3e03975 100644
--- a/src/Makefile_Ecore_Audio.am
+++ b/src/Makefile_Ecore_Audio.am
@@ -10,10 +10,7 @@ lib/ecore_audio/Ecore_Audio.h \
lib/ecore_audio/ecore_audio_obj.h \
lib/ecore_audio/ecore_audio_obj_in.h \
lib/ecore_audio/ecore_audio_obj_out.h \
-lib/ecore_audio/ecore_audio_obj_in_sndfile.h \
-lib/ecore_audio/ecore_audio_obj_out_sndfile.h \
lib/ecore_audio/ecore_audio_obj_in_tone.h \
-lib/ecore_audio/ecore_audio_obj_out_pulse.h \
lib/ecore_audio/ecore_audio_protected.h
@@ -22,11 +19,7 @@ lib/ecore_audio/ecore_audio.c \
lib/ecore_audio/ecore_audio_obj.c \
lib/ecore_audio/ecore_audio_obj_in.c \
lib/ecore_audio/ecore_audio_obj_out.c \
-lib/ecore_audio/ecore_audio_obj_in_sndfile.c \
-lib/ecore_audio/ecore_audio_obj_out_sndfile.c \
lib/ecore_audio/ecore_audio_obj_in_tone.c \
-lib/ecore_audio/ecore_audio_pulse_ml.c \
-lib/ecore_audio/ecore_audio_obj_out_pulse.c \
lib/ecore_audio/ecore_audio_private.h
lib_ecore_audio_libecore_audio_la_CPPFLAGS = @ECORE_AUDIO_CFLAGS@
@@ -34,4 +27,23 @@ lib_ecore_audio_libecore_audio_la_LIBADD = @ECORE_AUDIO_LIBS@
lib_ecore_audio_libecore_audio_la_DEPENDENCIES = @ECORE_AUDIO_INTERNAL_LIBS@
lib_ecore_audio_libecore_audio_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
+if HAVE_ECORE_AUDIO_PULSE
+dist_installed_ecoreaudiomainheaders_DATA += \
+lib/ecore_audio/ecore_audio_obj_out_pulse.h
+
+lib_ecore_audio_libecore_audio_la_SOURCES += \
+lib/ecore_audio/ecore_audio_pulse_ml.c \
+lib/ecore_audio/ecore_audio_obj_out_pulse.c
+endif
+
+if HAVE_ECORE_AUDIO_SNDFILE
+dist_installed_ecoreaudiomainheaders_DATA += \
+lib/ecore_audio/ecore_audio_obj_in_sndfile.h \
+lib/ecore_audio/ecore_audio_obj_out_sndfile.h
+
+lib_ecore_audio_libecore_audio_la_SOURCES += \
+lib/ecore_audio/ecore_audio_obj_in_sndfile.c \
+lib/ecore_audio/ecore_audio_obj_out_sndfile.c
+endif
+
endif