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-murphy-ivi],[PAVER],[janos.kovacs@intel.com])
8 AC_CONFIG_SRCDIR([murphy/module-murphy-ivi.c])
9 AC_CONFIG_HEADER([foo.h])
10 AC_CONFIG_MACRO_DIR([m4])
11 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])
32 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
35 #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"
37 #for flag in $DESIRED_FLAGS ; do
38 # CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
41 AC_LTDL_ENABLE_INSTALL
42 AC_LIBLTDL_INSTALLABLE
48 AC_CONFIG_SUBDIRS(libltdl)
55 AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
56 [Define ssize_t if it is not done by the standard libs.])])
60 AC_CHECK_DECLS(environ)
62 AC_DEFINE_UNQUOTED(PA_CFLAGS,"$CFLAGS", [The CFLAGS used during compilation])
64 PKG_CHECK_MODULES(LIBPULSE, [libpulse])
65 AC_SUBST(LIBPULSE_CFLAGS)
66 AC_SUBST(LIBPULSE_LIBS)
69 PKG_CHECK_MODULES(PULSEDEVEL, [pulseaudio-module-devel])
70 AC_SUBST(PULSEDEVEL_CFLAGS)
71 AC_SUBST(PULSEDEVEL_LIBS)
73 PKG_CHECK_MODULES(MURPHYCOMMON, [murphy-common])
74 AC_SUBST(MURPHYCOMMON_CFLAGS)
75 AC_SUBST(MURPHYCOMMON_LIBS)
77 PKG_CHECK_MODULES(LUAUTILS, [murphy-lua-utils])
78 AC_SUBST(LUAUTILS_CFLAGS)
79 AC_SUBST(LUAUTILS_LIBS)
82 PKG_CHECK_MODULES(LUA, lua >= 5.1.1)
86 PKG_CHECK_MODULES(AUL, aul, [have_aul=yes], [have_aul=no])
87 if test "$have_aul" = "no" -a "$enable_aul" = "yes"; then
88 AC_MSG_ERROR([AUL development headers not found.])
93 AM_CONDITIONAL(HAVE_AUL, [ test x$have_aul = "xyes" ])
97 [ AS_HELP_STRING([--with-dbus],
98 [Use D-Bus towards with Murphy and AudioManager])
100 [ build_with_dbus="yes" ;
101 PKG_CHECK_MODULES(DBUS, [dbus-1])
102 AC_SUBST(DBUS_CFLAGS)
105 [ build_with_dbus="no" ]
110 AM_CONDITIONAL(BUILD_WITH_DBUS, [ test "x$build_with_dbus" = "xyes" ])
113 AC_ARG_WITH([murphyif],
114 [ AS_HELP_STRING([--with-murphyif],
115 [Enable murphy domain-controller interface])
117 [ build_with_murphyif="yes" ;
118 PKG_CHECK_MODULES(MURPHYIF,
119 [murphy-domain-controller murphy-pulse])
120 AC_SUBST(MURPHYIF_CFLAGS)
121 AC_SUBST(MURPHYIF_LIBS)
122 AC_DEFINE([WITH_MURPHYIF], 1, [Enable Murphy interface ?])
124 [ build_with_murphyif="no" ]
127 AM_CONDITIONAL(BUILD_WITH_MURPHYIF, [ test "x$build_with_murphyif" = "xyes" ])
131 PKG_CHECK_MODULES(MURPHYDOMCTL, [murphy-domain-controller murphy-pulse])
132 AC_SUBST(MURPHYDOMCTL_CFLAGS)
133 AC_SUBST(MURPHYDOMCTL_LIBS)
139 AC_ARG_WITH([module-dir],
140 [AS_HELP_STRING([--with-module-dir], [Directory where to install the modules to (defaults to ${LIBDIR}/pulse-${PA_MAJORMINOR}/modules/])],
141 [modlibexecdir=$withval],
142 [modlibexecdir=${LIBDIR}/pulse-${PA_MAJORMINOR}/modules]
145 AC_SUBST(modlibexecdir)
149 AC_ARG_WITH([documentation],
150 [AS_HELP_STRING([--with-documentation],
151 [generate pdf, html and other doc files])],
153 [with_documentation=auto]
156 AS_IF( [ test x$with_documentation = xno ],
157 [ has_doc_tools="no" ],
158 [ AC_PATH_TOOL([PA_DOXYGEN], doxygen)
159 AC_PATH_TOOL([PA_LYX], lyx)
160 AC_PATH_TOOL([PA_INKSCAPE], inkscape)
161 AC_PATH_TOOL([PA_PYTHON], python)
162 AC_PATH_TOOL([PA_TOUCH], touch)
163 AC_PATH_TOOL([PA_DBLATEX], dblatex)
164 AC_PATH_TOOL([PA_XMLTO], xmlto)
166 AS_IF( [ test x$PA_DOXYGEN = x -o x$PA_LYX = x -o \
167 x$PA_INKSCAPE = x -o x$PA_PYTHON = x -o \
169 [ has_doc_tools="no";
170 AC_MSG_WARN([Some essential doc-tool is missing]) ],
171 [ has_doc_tools="yes";
176 AS_IF( [ test x$has_doc_tools == "xno" -o x$PA_DBLATEX = x ],
177 [ can_make_pdfs="no";
178 AC_WARN([No PDF documentation will be generated]) ],
179 [ can_make_pdfs="yes"]
182 AS_IF([ test x$has_doc_tools == "xno" -o x$PA_XMLTO = x ],
183 [ can_make_html="no";
184 AC_WARN([No HTML documentation will be generated]) ],
185 [ can_make_html="yes" ]
189 AM_CONDITIONAL(BUILD_DOCUMENTATION, [ test x$has_doc_tools = "xyes" ])
190 AM_CONDITIONAL(BUILD_PDF_DOCUMENTS, [ test x$can_make_pdfs = "xyes" ])
191 AM_CONDITIONAL(BUILD_HTML_DOCUMENTS, [ test x$can_make_html = "xyes" ])
193 AC_SUBST(PA_DOCDIR, [`pwd`/doc])
194 AC_SUBST(PA_FIGDIR, [$PA_DOCDIR/common/figures])
195 AC_SUBST(PA_MAKE_DOCRULES, [$PA_DOCDIR/Makefile.rules])
196 AC_SUBST(PA_DOCSCRIPT_DIR, [$PA_DOCDIR/scripts])
197 AC_SUBST(PA_DBLYXFIX, [$PA_DOCSCRIPT_DIR/dblyxfix.py])
198 AC_SUBST(PA_DOXML2DB, [$PA_DOCSCRIPT_DIR/doxml2db.py])
199 AC_SUBST(PA_DOXYDEPS, [$PA_DOCSCRIPT_DIR/doxydeps.py])
203 SHAVE_INIT([build-aux], [enable])
207 build-aux/shave-libtool
213 doc/murphy-audio/Makefile
214 doc/murphy-audio/db/Makefile
219 ---{ $PACKAGE_NAME $VERSION }---
222 sysconfdir: ${sysconfdir}
223 localstatedir: ${localstatedir}
224 modlibexecdir: ${modlibexecdir}
228 LIBPULSE_CFLAGS: ${LIBPULSE_CFLAGS}
229 LIBPULSE_LIBS: ${LIBPULSE_LIBS}
230 LIBPULSECORE_CFLAGS: ${LIBPULSECORE_CFLAGS}
231 LIBPULSECORE_LIBS: ${LIBPULSECORE_LIBS}
232 PULSEDEVEL_CFLAGS ${PULSEDEVEL_CFLAGS}
233 PULSEDEVEL_LIBS ${PULSEDEVEL_LIBS}
234 MAJORMINOR: ${PA_MAJORMINOR}
235 DBUS_CFLAGS: ${DBUS_CFLAGS}
236 DBUS_LIBS: ${DBUS_LIBS}
237 MURPHYCOMMON_CFLAGS ${MURPHYCOMMON_CFLAGS}
238 MURPHYCOMMON_LIBS ${MURPHYCOMMON_LIBS}
239 LUAUTILS_CFLAGS ${LUAUTILS_CFLAGS}
240 LUAUTILS_LIBS ${LUAUTILS_LIBS}
241 LUAUTILS_CFLAGS ${LUAUTILS_CFLAGS}
242 LUAUTILS_LIBS ${LUAUTILS_LIBS}
243 LUA_CFLAGS: ${LUA_CFLAGS}
244 LUA_LIBS: ${LUA_LIBS}
245 AUL_CFLAGS ${AUL_CFLAGS}
247 murphyif enabled: $build_with_murphyif
248 MURPHYIF_CFLAGS ${MURPHYIF_CFLAGS}
249 MURPHYIF_LIBS ${MURPHYIF_LIBS}