3 AC_INIT([libmm-sound], [1.0])
4 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
5 AC_CONFIG_HEADERS([config.h:config.hin])
7 AC_CONFIG_MACRO_DIR([m4])
10 m4_pattern_allow([AM_PROG_AR])
18 AC_FUNC_SELECT_ARGTYPES
24 AC_PROG_GCC_TRADITIONAL
27 # Checks for libraries.
28 PKG_CHECK_MODULES(MMCOMMON, mm-common)
29 AC_SUBST(MMCOMMON_CFLAGS)
30 AC_SUBST(MMCOMMON_LIBS)
32 if [test "x$IS_SDK" = "xyes"];
34 echo "SDK build does not use mm-log"
36 PKG_CHECK_MODULES(MMLOG, mm-log)
37 AC_SUBST(MMLOG_CFLAGS)
41 PKG_CHECK_MODULES(MMSESSION, mm-session)
42 AC_SUBST(MMSESSION_CFLAGS)
43 AC_SUBST(MMSESSION_LIBS)
45 PKG_CHECK_MODULES(AUDIOSESSIONMGR, audio-session-mgr)
46 AC_SUBST(AUDIOSESSIONMGR_CFLAGS)
47 AC_SUBST(AUDIOSESSIONMGR_LIBS)
49 PKG_CHECK_MODULES(GLIB2, glib-2.0 gthread-2.0)
50 AC_SUBST(GLIB2_CFLAGS)
53 PKG_CHECK_MODULES(GIO, gio-2.0)
57 PKG_CHECK_MODULES(VCONF, vconf)
58 AC_SUBST(VCONF_CFLAGS)
61 AC_ARG_ENABLE(pulse, AC_HELP_STRING([--enable-pulse], [enable pulseaudio client]),
63 case "${enableval}" in
66 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pulse) ;;
69 if test "x$USE_PULSE" = "xyes"; then
70 PKG_CHECK_MODULES(PASIMPLE, libpulse-simple)
71 AC_SUBST(PASIMPLE_CFLAGS)
72 AC_SUBST(PASIMPLE_LIBS)
73 PKG_CHECK_MODULES(PA, libpulse)
77 AM_CONDITIONAL([USE_PULSE], [test "x$USE_PULSE" = "xyes"])
79 AC_ARG_ENABLE(ogg, AC_HELP_STRING([--enable-ogg], [enable ogg client]),
81 case "${enableval}" in
82 yes) OGG_SUPPORT=yes ;;
84 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ogg) ;;
87 if test "x$OGG_SUPPORT" = "xyes"; then
88 PKG_CHECK_MODULES(TREMOLO, libtremolo)
89 AC_SUBST(TREMOLO_CFLAGS)
90 AC_SUBST(TREMOLO_LIBS)
92 AM_CONDITIONAL([OGG_SUPPORT], [test "x$OGG_SUPPORT" = "xyes"])
94 dnl use security ---------------------------------------------------------------
95 AC_ARG_ENABLE(security, AC_HELP_STRING([--enable-security], [using security]),
97 case "${enableval}" in
98 yes) USE_SECURITY=yes ;;
99 no) USE_SECURITY=no ;;
100 *) AC_MSG_ERROR(bad value ${enableval} for --enable-security) ;;
104 if test "x$USE_SECURITY" = "xyes"; then
105 PKG_CHECK_MODULES(SECURITY, security-server)
106 AC_SUBST(SECURITY_CFLAGS)
107 AC_SUBST(SECURITY_LIBS)
109 AM_CONDITIONAL(USE_SECURITY, test "x$USE_SECURITY" = "xyes")
110 dnl end ------------------------------------------------------------------------
113 AC_ARG_ENABLE(focus, AC_HELP_STRING([--enable-focus], [enable focus feature]),
115 case "${enableval}" in
116 yes) USE_FOCUS=yes ;;
118 *) AC_MSG_ERROR(bad value ${enableval} for --enable-focus) ;;
121 AM_CONDITIONAL([USE_FOCUS], [test "x$USE_FOCUS" = "xyes"])
123 AC_ARG_WITH(plugindir, AS_HELP_STRING([--with-plugindir=<path>],[sound-server plugin dir]))
124 if test -z "$with_plugindir" ; then
125 PLUGIN_DIR=/usr/lib/soundplugins/
127 PLUGIN_DIR=$with_plugindir
130 AC_DEFINE_UNQUOTED(PLUGIN_DIR,"$PLUGIN_DIR", [sound-server plugin dir])
132 # Checks for header files.
134 AC_CHECK_HEADERS([fcntl.h memory.h stdlib.h string.h sys/time.h unistd.h errno.h sys/types.h sys/stat.h])
136 # Checks for typedefs, structures, and compiler characteristics.
141 # Checks for library functions.
146 AC_FUNC_SELECT_ARGTYPES
148 AC_CHECK_FUNCS([memset select])
153 server/plugin/Makefile
154 server/plugin/wav/Makefile
155 server/plugin/ogg/Makefile
156 server/plugin/keytone/Makefile
157 server/plugin/tone/Makefile
158 focus_server/Makefile
160 pkgconfig/mm-sound.pc
161 pkgconfig/mm-keysound.pc
162 pkgconfig/mm-bootsound.pc