summaryrefslogtreecommitdiff
path: root/configure.ac
blob: ace5364899730e93879e77c51b1c99474b5da886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#                                               -*- 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(MM_RESOURCE_MANAGER, mm-resource-manager)
AC_SUBST(MM_RESOURCE_MANAGER_CFLAGS)
AC_SUBST(MM_RESOURCE_MANAGER_LIBS)

PKG_CHECK_MODULES(DLOG, dlog)
AC_SUBST(DLOG_CFLAGS)
AC_SUBST(DLOG_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-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(SOUNDMGR, capi-media-sound-manager)
  AC_SUBST(SOUNDMGR_CFLAGS)
  AC_SUBST(SOUNDMGR_LIBS)
fi


AC_CONFIG_FILES([
	Makefile
	src/Makefile
	mm-radio.pc
])
AC_OUTPUT