summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2015-04-15 16:53:39 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-07 09:53:07 +0200
commit62e29b39f4df40fd3c0a6b17f7a16f0f8fc1d0c9 (patch)
treeef94069e64c3d00e792a55fc4bc9147b054cffa1 /configure.ac
parenta53c52dee0a3906d1ed3628396929127bcb665ea (diff)
ecore_audio: integrate Apple's CoreAudio to play sounds on OS X.
Summary: Ecore_Audio now supports Apple's CoreAudio to play sounds read by libsndfile. edje_multisense integrates this new feature to enable PLAY_SAMPLE on OS X. Test Plan: Compiles, links and installs fine on OS X. Run terminology and elementary_test to hear sound played on user input. Reviewers: raster, naguirre, cedric Reviewed By: cedric Subscribers: plamot, cedric Differential Revision: https://phab.enlightenment.org/D2295 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac70
1 files changed, 64 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 45fa102..9eed98c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3208,6 +3208,54 @@ AC_ARG_ENABLE([pulseaudio],
3208 ], 3208 ],
3209 [want_pulseaudio="yes"]) 3209 [want_pulseaudio="yes"])
3210 3210
3211if test "x${have_darwin}" = "xyes"; then
3212 want_pulseaudio="no"
3213 want_alsa="no"
3214 want_coreaudio="yes"
3215else
3216 want_coreaudio="no"
3217fi
3218
3219
3220# CoreAudio flags
3221if test "x${want_coreaudio}" = "xyes"; then
3222 coreaudio_ldflags=""
3223 have_coreaudio="no"
3224 LIBS_save="$LIBS"
3225 LIBS="$LIBS -framework CoreAudio"
3226 AC_LINK_IFELSE(
3227 [AC_LANG_PROGRAM(
3228 [[
3229#include <CoreAudio/CoreAudio.h>
3230 ]],
3231 [[
3232UInt32 size;
3233AudioDeviceID dev_id;
3234AudioObjectPropertyAddress prop = {
3235 kAudioHardwarePropertyDefaultOutputDevice,
3236 kAudioObjectPropertyScopeGlobal,
3237 kAudioObjectPropertyElementMaster
3238};
3239size = sizeof(AudioDeviceID);
3240AudioObjectGetPropertyData(kAudioObjectSystemObject, &prop, 0, NULL,
3241 &size, &dev_id);
3242 ]])],
3243 [
3244 have_coreaudio="yes"
3245 coreaudio_ldflags="-framework CoreAudio"
3246 ],
3247 [have_coreaudio="no"])
3248 LIBS="$LIBS_save"
3249 AC_MSG_CHECKING([whether Apple CoreAudio framework is supported])
3250 AC_MSG_RESULT([${have_coreaudio}])
3251fi
3252AC_SUBST(coreaudio_ldflags)
3253if test "x${have_coreaudio}" = "xyes"; then
3254 AC_DEFINE([HAVE_COREAUDIO], [1], [CoreAudio support enabled])
3255else
3256 AC_DEFINE([HAVE_COREAUDIO], [0], [CoreAudio support disabled])
3257fi
3258
3211 3259
3212### Default values 3260### Default values
3213 3261
@@ -3234,6 +3282,7 @@ EFL_EVAL_PKGS([ECORE_AUDIO])
3234EFL_ADD_FEATURE([ECORE_AUDIO], [alsa]) 3282EFL_ADD_FEATURE([ECORE_AUDIO], [alsa])
3235EFL_ADD_FEATURE([ECORE_AUDIO], [pulseaudio]) 3283EFL_ADD_FEATURE([ECORE_AUDIO], [pulseaudio])
3236EFL_ADD_FEATURE([ECORE_AUDIO], [sndfile]) 3284EFL_ADD_FEATURE([ECORE_AUDIO], [sndfile])
3285EFL_ADD_FEATURE([ECORE_AUDIO], [coreaudio])
3237 3286
3238### Checks for header files 3287### Checks for header files
3239 3288
@@ -3250,6 +3299,7 @@ EFL_ADD_FEATURE([ECORE_AUDIO], [sndfile])
3250EFL_LIB_END_OPTIONAL([Ecore_Audio]) 3299EFL_LIB_END_OPTIONAL([Ecore_Audio])
3251AM_CONDITIONAL([HAVE_ECORE_AUDIO_PULSE], [test "x${want_pulseaudio}" = "xyes"]) 3300AM_CONDITIONAL([HAVE_ECORE_AUDIO_PULSE], [test "x${want_pulseaudio}" = "xyes"])
3252AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test "x${want_sndfile}" = "xyes"]) 3301AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test "x${want_sndfile}" = "xyes"])
3302AM_CONDITIONAL([HAVE_ECORE_AUDIO_CORE_AUDIO], [test "x${want_coreaudio}" = "xyes"])
3253 3303
3254#### End of Ecore_Audio 3304#### End of Ecore_Audio
3255 3305
@@ -4117,7 +4167,7 @@ EFL_LIB_START([Edje])
4117### Additional options to configure 4167### Additional options to configure
4118 4168
4119### Default values 4169### Default values
4120want_multisense="${want_pulseaudio}" 4170
4121AC_ARG_ENABLE([multisense], 4171AC_ARG_ENABLE([multisense],
4122 [AS_HELP_STRING([--enable-multisense],[Enable multisense support. @<:@default=enabled@:>@])], 4172 [AS_HELP_STRING([--enable-multisense],[Enable multisense support. @<:@default=enabled@:>@])],
4123 [ 4173 [
@@ -4128,7 +4178,13 @@ AC_ARG_ENABLE([multisense],
4128 CFOPT_WARNING="xyes" 4178 CFOPT_WARNING="xyes"
4129 fi 4179 fi
4130 ], 4180 ],
4131 [want_multisense="${want_pulseaudio}"]) 4181 [
4182 if test "x${want_pulseaudio}" = "xyes" -o "x${want_coreaudio}" = "xyes"; then
4183 want_multisense="yes"
4184 else
4185 want_multisense="no"
4186 fi
4187 ])
4132 4188
4133# TODO: should we keep or remove these? 4189# TODO: should we keep or remove these?
4134want_edje_program_cache="no" 4190want_edje_program_cache="no"
@@ -4960,11 +5016,12 @@ if test -n "$CFOPT_WARNING"; then
4960 echo "Reconsider disabling audio." 5016 echo "Reconsider disabling audio."
4961 echo "_____________________________________________________________________" 5017 echo "_____________________________________________________________________"
4962 fi 5018 fi
4963 if test "x${want_pulseaudio}" = "xno"; then 5019 if test "x${have_darwin}" = "xno" -a "x${want_pulseaudio}" = "xno"; then
4964 echo "_____________________________________________________________________" 5020 echo "_____________________________________________________________________"
4965 echo "The only audio output method supported by Ecore right now is via" 5021 echo "The only audio output method supported by Ecore right now on your"
4966 echo "Pulseaudio. You have disabled that and likely have broken a whole" 5022 echo "system is via Pulseaudio. You have disabled that and likely have"
4967 echo "bunch of things in the process. Reconsider your configure options." 5023 echo "broken a whole bunch of things in the process. Reconsider your"
5024 echo "configure options."
4968 echo "_____________________________________________________________________" 5025 echo "_____________________________________________________________________"
4969 fi 5026 fi
4970 if test "x${want_xinput2}" = "xno"; then 5027 if test "x${want_xinput2}" = "xno"; then
@@ -5143,3 +5200,4 @@ if test "x${efl_deprecated_option}" = "xyes"; then
5143 echo "" 5200 echo ""
5144 echo "#-------------------------------------------------------------------#" 5201 echo "#-------------------------------------------------------------------#"
5145fi 5202fi
5203