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]))
6 AC_INIT([pulseaudio-genivi-mir],[PAVER],[janos.f.kovacs@nokia.com])
10 AC_CONFIG_SRCDIR([src/module-genivi-mir.c])
11 AC_CONFIG_MACRO_DIR([m4])
12 AM_INIT_AUTOMAKE([foreign 1.8.5 -Wall])
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}])
18 AC_SUBST(PA_MAJORMINOR, [PAVER])
24 AC_PROG_GCC_TRADITIONAL
25 AC_USE_SYSTEM_EXTENSIONS
27 AC_PATH_PROG([M4], [m4 gm4], [no])
28 if test "x$M4" = xno ; then
29 AC_MSG_ERROR([m4 missing])
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"
35 #for flag in $DESIRED_FLAGS ; do
36 # CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
39 AC_LTDL_ENABLE_INSTALL
40 AC_LIBLTDL_INSTALLABLE
46 AC_CONFIG_SUBDIRS(libltdl)
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.])])
58 AC_CHECK_DECLS(environ)
60 AC_DEFINE_UNQUOTED(PA_CFLAGS,"$CFLAGS", [The CFLAGS used during compilation])
62 PKG_CHECK_MODULES(LIBPULSE, [libpulse])
63 AC_SUBST(LIBPULSE_CFLAGS)
64 AC_SUBST(LIBPULSE_LIBS)
66 #PKG_CHECK_MODULES(LIBPULSECORE, [pulsecore])
67 #AC_SUBST(LIBPULSECORE_CFLAGS)
68 #AC_SUBST(LIBPULSECORE_LIBS)
70 PKG_CHECK_MODULES(PULSEDEVEL, [pulseaudio-module-devel])
71 AC_SUBST(PULSEDEVEL_CFLAGS)
72 AC_SUBST(PULSEDEVEL_LIBS)
75 PKG_CHECK_MODULES(DBUS, [dbus-1])
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])
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)
90 AC_SUBST(modlibexecdir)
100 ---{ $PACKAGE_NAME $VERSION }---
103 sysconfdir: ${sysconfdir}
104 localstatedir: ${localstatedir}
105 modlibexecdir: ${modlibexecdir}
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}