From: Daniel Willmann Date: Fri, 14 Dec 2012 23:38:25 +0000 (+0000) Subject: efl: Add build system support for ecore_audio X-Git-Tag: submit/devel/efl/20131022.203902~2831 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29931c273f9d4c61c63c204373964281e64e7b1c;p=platform%2Fupstream%2Fefl.git efl: Add build system support for ecore_audio Disabled by default, enable with --enable-audio ALSA support is disabled as it is not there yet. Pulseaudio should work though. Support for .ogg and .wav is there as well (.mp3 is not) Signed-off-by: Daniel Willmann SVN revision: 81000 --- diff --git a/configure.ac b/configure.ac index 92df65c..ae4570a 100644 --- a/configure.ac +++ b/configure.ac @@ -139,6 +139,7 @@ requirements_libs_ecore_win32="" requirements_libs_ecore_wince="" requirements_libs_ecore_x="" requirements_libs_ecore_evas="" +requirements_libs_ecore_audio="" requirements_libs_embryo="" requirements_libs_eio="" #requirements_libs_edje="" @@ -168,6 +169,7 @@ requirements_pc_ecore_win32="" requirements_pc_ecore_wince="" requirements_pc_ecore_x="" requirements_pc_ecore_evas="" +requirements_pc_ecore_audio="" requirements_pc_embryo="" requirements_pc_eio="" #requirements_pc_edje="" @@ -216,6 +218,7 @@ AC_SUBST([requirements_libs_ecore_win32]) AC_SUBST([requirements_libs_ecore_wince]) AC_SUBST([requirements_libs_ecore_x]) AC_SUBST([requirements_libs_ecore_evas]) +AC_SUBST([requirements_libs_ecore_audio]) AC_SUBST([requirements_libs_embryo]) AC_SUBST([requirements_libs_eio]) #AC_SUBST([requirements_libs_edje]) @@ -245,6 +248,7 @@ AC_SUBST([requirements_pc_ecore_win32]) AC_SUBST([requirements_pc_ecore_wince]) AC_SUBST([requirements_pc_ecore_x]) AC_SUBST([requirements_pc_ecore_evas]) +AC_SUBST([requirements_pc_ecore_audio]) AC_SUBST([requirements_pc_embryo]) AC_SUBST([requirements_pc_eio]) #AC_SUBST([requirements_pc_edje]) @@ -3120,6 +3124,82 @@ fi #### End of Ecore_Evas +#### Ecore_Audio +AC_ARG_ENABLE([audio], + [AC_HELP_STRING([--enable-audio], [enable Ecore_Audio])], + [ + if test "x${enableval}" = "xyes" ; then + want_ecore_audio="yes" + else + want_ecore_audio="no" + fi + ], + [want_ecore_audio="no"]) + +if test "x${want_ecore_audio}" = "xyes" ; then + +AC_MSG_NOTICE([Ecore_Audio checks]) + +### Additional options to configure + +### Default values + +### Checks for programs + +### Checks for libraries + +# Eina, Eo, Eet, Ecore + +requirements_pc_ecore_audio="ecore >= ${PACKAGE_VERSION} eet >= ${PACKAGE_VERSION} eina >= ${PACKAGE_VERSION} ${requirements_pc_ecore_audio}" + +use_alsa="no" +# ALSA support is not really there yet...uncomment if you want to play around with it +#PKG_CHECK_EXISTS([ALSA], [alsa], [ +# use_alsa="yes" +# AC_DEFINE([HAVE_ALSA], [1], [Alsa library]) +# requirements_pc_ecore_audio="alsa ${requirements_pc_ecore_audio}" +# requirements_pc_deps_ecore_audio="alsa ${requirements_pc_deps_ecore_audio}" +# ], [use_alsa="no"]) + +have_pulse="no" +PKG_CHECK_EXISTS([libpulse], + [ + use_pulse="yes" + AC_DEFINE([HAVE_PULSE], [1], [Pulseaudio library]) + requirements_pc_ecore_audio="libpulse ${requirements_pc_ecore_audio}" + requirements_pc_deps_ecore_audio="libpulse ${requirements_pc_deps_ecore_audio}" + ], [use_pulse="no"]) + +use_sndfile="no" +PKG_CHECK_EXISTS([sndfile], [ + use_sndfile="yes" + AC_DEFINE([HAVE_SNDFILE], [1], [libsndfile library]) + requirements_pc_ecore_audio="sndfile ${requirements_pc_ecore_audio}" + requirements_pc_deps_ecore_audio="sndfile ${requirements_pc_deps_ecore_audio}" + ], [use_sndfile="no"]) + +PKG_CHECK_MODULES([ECORE_AUDIO], [${requirements_pc_deps_ecore_audio}]) + +ECORE_AUDIO_CFLAGS="${ECORE_AUDIO_CFLAGS}" +ECORE_AUDIO_LIBS="${ECORE_AUDIO_LIBS}" +requirements_libs_ecore_audio="${requirements_libs_ecore_audio}" + +### Checks for header files + +### Checks for types + +### Checks for structures + +### Checks for compiler characteristics + +### Checks for linker characteristics + +### Checks for library functions + +fi + +AM_CONDITIONAL([HAVE_ECORE_AUDIO], [test "x${want_ecore_audio}" = "xyes"]) + #### Eio @@ -3280,6 +3360,7 @@ pc/ecore-x.pc pc/ecore-evas.pc pc/ecore-imf.pc pc/ecore-imf-evas.pc +pc/ecore-audio.pc pc/embryo.pc pc/eio.pc $po_makefile_in @@ -3479,6 +3560,15 @@ echo " Ecore_Evas...................: $have_ecore_evas" echo " Extn (Plug/socket Extn)....: $have_ecore_evas_extn" #fi echo +echo "Ecore Sound system:" +echo +echo " Ecore_Audio..................: $want_ecore_audio" +if test "x${want_ecore_audio}" = "xyes" ; then +echo " ALSA.......................: $use_alsa" +echo " PulseAudio.................: $use_pulse" +echo " SndFile....................: $use_sndfile" +fi +echo echo "Tests..................: ${_efl_enable_tests}" if test "x${_efl_enable_tests}" = "xyes"; then echo " Coverage...........: ${_efl_enable_coverage}" diff --git a/pc/ecore-audio.pc.in b/pc/ecore-audio.pc.in new file mode 100644 index 0000000..ced2f83 --- /dev/null +++ b/pc/ecore-audio.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: ecore-audio +Description: E core library, audio module +Requires.private: @requirements_pc_ecore_audio@ +Version: @VERSION@ +Libs: -L${libdir} -lecore_audio +Libs.private: @requirements_libs_ecore_audio@ +Cflags: -I${includedir}/ecore-@VMAJ@ diff --git a/src/Makefile.am b/src/Makefile.am index 684f54c..a9c4f3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -53,6 +53,9 @@ include Makefile_Ecore_X.am endif include Makefile_Ecore_Imf.am include Makefile_Ecore_Evas.am +if HAVE_ECORE_AUDIO +include Makefile_Ecore_Audio.am +endif include Makefile_Embryo.am include Makefile_Eio.am diff --git a/src/Makefile_Ecore_Audio.am b/src/Makefile_Ecore_Audio.am new file mode 100644 index 0000000..7862ad9 --- /dev/null +++ b/src/Makefile_Ecore_Audio.am @@ -0,0 +1,41 @@ + +### Library + +lib_LTLIBRARIES += lib/ecore_audio/libecore_audio.la + +installed_ecoreaudiomainheadersdir = $(includedir)/ecore-@VMAJ@ +dist_installed_ecoreaudiomainheaders_DATA = \ +lib/ecore_audio/Ecore_Audio.h + +lib_ecore_audio_libecore_audio_la_SOURCES = \ +lib/ecore_audio/ecore_audio.c \ +lib/ecore_audio/ecore_audio_alsa.c \ +lib/ecore_audio/ecore_audio_pulse.c \ +lib/ecore_audio/ecore_audio_sndfile.c \ +lib/ecore_audio/ecore_audio_tone.c \ +lib/ecore_audio/ecore_audio_custom.c \ +lib/ecore_audio/ecore_audio_private.h + +lib_ecore_audio_libecore_audio_la_CPPFLAGS = \ +-I$(top_srcdir)/src/lib/eina \ +-I$(top_srcdir)/src/lib/eo \ +-I$(top_srcdir)/src/lib/eet \ +-I$(top_srcdir)/src/lib/ecore \ +-I$(top_builddir)/src/lib/eina \ +-I$(top_builddir)/src/lib/eo \ +-I$(top_builddir)/src/lib/eet \ +-I$(top_builddir)/src/lib/ecore \ +-DEFL_ECORE_AUDIO_BUILD \ +@EFL_CFLAGS@ \ +@EFL_COV_CFLAGS@ \ +@ECORE_AUDIO_CFLAGS@ + +lib_ecore_audio_libecore_audio_la_LIBADD = \ +lib/ecore/libecore.la \ +lib/eet/libeet.la \ +lib/eo/libeo.la \ +lib/eina/libeina.la + +lib_ecore_audio_libecore_audio_la_LIBADD += @ECORE_AUDIO_LIBS@ @EFL_COV_LIBS@ -lm + +lib_ecore_audio_libecore_audio_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@ diff --git a/src/lib/ecore/Ecore.h b/src/lib/ecore/Ecore.h index d3585fc..4dacb7c 100644 --- a/src/lib/ecore/Ecore.h +++ b/src/lib/ecore/Ecore.h @@ -32,6 +32,7 @@ @li @link Ecore_X.h Ecore_X - X Windows System wrapper. @endlink @li @ref Ecore_Win32_Group @li @ref Ecore_WinCE_Group + @li @ref Ecore_Audio_Group For more info on Ecore usage, there are these @ref Examples. @@ -123,6 +124,7 @@ sudo make install @author Jérémy Zurcher @author Vikram Narayanan @author Gwanglim Lee + @author Daniel Willmann Please contact to get in contact with the developers and maintainers.