router: routing table lists are added/maintained as module properties
[profile/ivi/pulseaudio-module-murphy-ivi.git] / configure.ac
1 m4_define(FULL_PAVER, esyscmd(/usr/bin/pkg-config --silence-errors --modversion pulsecore | tr -d \\n))
2 m4_define(PAVER, regexp(FULL_PAVER, [\([0123456789.]+\).*], [\1]))
3
4 AC_PREREQ(2.61)
5
6 AC_INIT([pulseaudio-genivi-mir],[PAVER],[janos.f.kovacs@nokia.com])
7
8 DOC_SUPPORT_INIT()
9
10 AC_CONFIG_SRCDIR([src/module-genivi-mir.c])
11 AC_CONFIG_MACRO_DIR([m4])
12 AM_INIT_AUTOMAKE([foreign 1.8.5 -Wall])
13
14 # this would not be really needed if everything would be as it should be
15 AS_IF([test x${exec_prefix} = xNONE], [LIBDIR=$ac_default_prefix/lib], [LIBDIR=${libdir}])
16 AC_SUBST(LIBDIR)
17
18 AC_SUBST(PA_MAJORMINOR, [PAVER])
19
20 AC_PROG_MKDIR_P
21 AC_PROG_CC
22 AC_PROG_CC_C99
23 AM_PROG_CC_C_O
24 AC_PROG_GCC_TRADITIONAL
25 AC_USE_SYSTEM_EXTENSIONS
26
27 AC_PATH_PROG([M4], [m4 gm4], [no])
28 if test "x$M4" = xno ; then
29    AC_MSG_ERROR([m4 missing])
30 fi
31
32 #dnl Compiler flags
33 #DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wno-long-long -Wvla -Wno-overlength-strings -Wconversion -Wundef -Wformat -Wlogical-op -Wpacked -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -ffast-math"
34
35 #for flag in $DESIRED_FLAGS ; do
36 #  CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
37 #done
38
39 AC_LTDL_ENABLE_INSTALL
40 AC_LIBLTDL_INSTALLABLE
41 AC_LIBTOOL_DLOPEN
42 AC_LIBTOOL_WIN32_DLL
43 AC_PROG_LIBTOOL
44 AC_SUBST(LTDLINCL)
45 AC_SUBST(LIBLTDL)
46 AC_CONFIG_SUBDIRS(libltdl)
47
48 AC_HEADER_STDC
49 AC_C_CONST
50 AC_C_BIGENDIAN
51 AC_TYPE_PID_T
52 AC_TYPE_SIZE_T
53 AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
54     [Define ssize_t if it is not done by the standard libs.])])
55 AC_TYPE_OFF_T
56 AC_TYPE_SIGNAL
57 AC_TYPE_UID_T
58 AC_CHECK_DECLS(environ)
59
60 AC_DEFINE_UNQUOTED(PA_CFLAGS,"$CFLAGS", [The CFLAGS used during compilation])
61
62 PKG_CHECK_MODULES(LIBPULSE, [libpulse])
63 AC_SUBST(LIBPULSE_CFLAGS)
64 AC_SUBST(LIBPULSE_LIBS)
65
66 #PKG_CHECK_MODULES(LIBPULSECORE, [pulsecore])
67 #AC_SUBST(LIBPULSECORE_CFLAGS)
68 #AC_SUBST(LIBPULSECORE_LIBS)
69
70 PKG_CHECK_MODULES(PULSEDEVEL, [pulseaudio-module-devel])
71 AC_SUBST(PULSEDEVEL_CFLAGS)
72 AC_SUBST(PULSEDEVEL_LIBS)
73
74
75 PKG_CHECK_MODULES(DBUS, [dbus-1])
76 AC_SUBST(DBUS_CFLAGS)
77 AC_SUBST(DBUS_LIBS)
78
79
80 AC_ARG_WITH(
81         [module-dir],
82         AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${LIBDIR}/pulse-${PA_MAJORMINOR}/modules/]),
83         [modlibexecdir=$withval], [modlibexecdir=${LIBDIR}/pulse-${PA_MAJORMINOR}/modules])
84
85 PULSEAUDIO_HAS_PORTS=0
86 echo -e "#include <pulsecore/pulsecore-config.h>\n #include <pulsecore/sink.h>\nint main() {\nreturn pa_sink_set_port((struct pa_sink *)0,\"\",0);\n}" | ${CC} ${CFLAGS} ${LIBPULSECORE_CFLAGS} ${LIBPULSE_CFLAGS} ${AM_LIBADD} ${LIBPULSECORE_LIBS} ${LIBPULSE_LIBS} -Wmissing-declarations -Werror -x c -c -o /dev/null - && PULSEAUDIO_HAS_PORTS=1
87 AC_SUBST(PULSEAUDIO_HAS_PORTS)
88
89
90 AC_SUBST(modlibexecdir)
91
92 AC_CONFIG_FILES([
93         Makefile
94         src/Makefile
95         doc/Makefile
96 ])
97 AC_OUTPUT
98
99 echo "
100  ---{ $PACKAGE_NAME $VERSION }---
101
102     prefix:               ${prefix}
103     sysconfdir:           ${sysconfdir}
104     localstatedir:        ${localstatedir}
105     modlibexecdir:        ${modlibexecdir}
106     Compiler:             ${CC}
107     CFLAGS:               ${CFLAGS}
108     LIBDIR:               ${LIBDIR}
109     LIBPULSE_CFLAGS:      ${LIBPULSE_CFLAGS}
110     LIBPULSE_LIBS:        ${LIBPULSE_LIBS}
111     LIBPULSECORE_CFLAGS:  ${LIBPULSECORE_CFLAGS}
112     LIBPULSECORE_LIBS:    ${LIBPULSECORE_LIBS}
113     MAJORMINOR:           ${PA_MAJORMINOR}
114     PULSEAUDIO_HAS_PORTS: ${PULSEAUDIO_HAS_PORTS}
115     DBUS_CFLAGS:          ${DBUS_CFLAGS}
116     DBUS_LIBS:            ${DBUS_LIBS}
117     PD_SUPPORT:           ${PD_SUPPORT}
118 "