# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT(libmm-radio, 0.1.0, heechul.jeon@samsung.com) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_SRCDIR([src/mm_radio.c]) AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_LIBTOOL m4_pattern_allow([AM_PROG_AR]) AM_PROG_AR AC_PROG_CC # Checks for libraries. # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdlib.h sys/ioctl.h sys/time.h termios.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_TYPE_PID_T AC_HEADER_TIME # Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MALLOC AC_CHECK_FUNCS([memset strstr]) PKG_CHECK_MODULES(GTHREAD, gthread-2.0) AC_SUBST(GTHREAD_CFLAGS) AC_SUBST(GTHREAD_LIBS) PKG_CHECK_MODULES(MMCOMMON, mm-common) AC_SUBST(MMCOMMON_CFLAGS) AC_SUBST(MMCOMMON_LIBS) PKG_CHECK_MODULES(MURPHY_RESOURCE, murphy-resource) AC_SUBST(MURPHY_RESOURCE_CFLAGS) AC_SUBST(MURPHY_RESOURCE_LIBS) PKG_CHECK_MODULES(MURPHY_GLIB, murphy-glib) AC_SUBST(MURPHY_GLIB_CFLAGS) AC_SUBST(MURPHY_GLIB_LIBS) AC_ARG_ENABLE(emulator, AC_HELP_STRING([--enable-emulator], [using emulator interface]), [ case "${enableval}" in yes) ENABLE_EMULATOR=yes ;; no) ENABLE_EMULATOR=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-emulator) ;; esac ],[ENABLE_EMULATOR=no]) AM_CONDITIONAL(ENABLE_EMULATOR, test "x$ENABLE_EMULATOR" = "xyes") if test "x$ENABLE_EMULATOR" == "xyes"; then PKG_CHECK_MODULES(GST, gstreamer-1.0) AC_SUBST(GST_CFLAGS) AC_SUBST(GST_LIBS) PKG_CHECK_MODULES(GSTAPP, gstreamer-app-1.0) AC_SUBST(GSTAPP_CFLAGS) AC_SUBST(GSTAPP_LIBS) fi AC_ARG_ENABLE(sound-focus, AC_HELP_STRING([--enable-sound-focus], [using sound focus]), [ case "${enableval}" in yes) ENABLE_SOUND_FOCUS=yes ;; no) ENABLE_SOUND_FOCUS=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-sound-focus) ;; esac ],[ENABLE_SOUND_FOCUS=no]) AM_CONDITIONAL(ENABLE_SOUND_FOCUS, test "x$ENABLE_SOUND_FOCUS" = "xyes") if test "x$ENABLE_SOUND_FOCUS" == "xyes"; then PKG_CHECK_MODULES(MMSESSION, mm-session) AC_SUBST(MMSESSION_CFLAGS) AC_SUBST(MMSESSION_LIBS) PKG_CHECK_MODULES(MMSOUND, mm-sound) AC_SUBST(MMSOUND_CFLAGS) AC_SUBST(MMSOUND_LIBS) fi AC_ARG_ENABLE(sound-vstream, AC_HELP_STRING([--enable-sound-vstream], [using sound virtual stream]), [ case "${enableval}" in yes) ENABLE_SOUND_VSTREAM=yes ;; no) ENABLE_SOUND_VSTREAM=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-sound-vstream) ;; esac ],[ENABLE_SOUND_VSTREAM=no]) AM_CONDITIONAL(ENABLE_SOUND_VSTREAM, test "x$ENABLE_SOUND_VSTREAM" = "xyes") if test "x$ENABLE_SOUND_VSTREAM" == "xyes"; then PKG_CHECK_MODULES(SOUDNMGR, capi-media-sound-manager) AC_SUBST(SOUNDMGR_CFLAGS) AC_SUBST(SOUNDMGR_LIBS) fi AC_CONFIG_FILES([ Makefile src/Makefile mm-radio.pc ]) AC_OUTPUT