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" ]
108 AM_CONDITIONAL(BUILD_WITH_DBUS, [ test "x$build_with_dbus" = "xyes" ])
111 AC_ARG_WITH([murphyif],
112 [ AS_HELP_STRING([--with-murphyif],
113 [Enable murphy domain-controller interface])
115 [ build_with_murphyif="yes" ;
116 PKG_CHECK_MODULES(MURPHYIF,
117 [murphy-domain-controller murphy-pulse])
118 AC_SUBST(MURPHYIF_CFLAGS)
119 AC_SUBST(MURPHYIF_LIBS)
120 AC_DEFINE([WITH_MURPHYIF], 1, [Enable Murphy interface ?])
122 [ build_with_murphyif="no" ]
125 AM_CONDITIONAL(BUILD_WITH_MURPHYIF, [ test "x$build_with_murphyif" = "xyes" ])
129 PKG_CHECK_MODULES(MURPHYDOMCTL, [murphy-domain-controller murphy-pulse])
130 AC_SUBST(MURPHYDOMCTL_CFLAGS)
131 AC_SUBST(MURPHYDOMCTL_LIBS)
137 AC_ARG_WITH([module-dir],
138 [AS_HELP_STRING([--with-module-dir], [Directory where to install the modules to (defaults to ${LIBDIR}/pulse-${PA_MAJORMINOR}/modules/])],
139 [modlibexecdir=$withval],
140 [modlibexecdir=${LIBDIR}/pulse-${PA_MAJORMINOR}/modules]
143 AC_SUBST(modlibexecdir)
147 AC_ARG_WITH([documentation],
148 [AS_HELP_STRING([--with-documentation],
149 [generate pdf, html and other doc files])],
151 [with_documentation=auto]
154 AS_IF( [ test x$with_documentation = xno ],
155 [ has_doc_tools="no" ],
156 [ AC_PATH_TOOL([PA_DOXYGEN], doxygen)
157 AC_PATH_TOOL([PA_LYX], lyx)
158 AC_PATH_TOOL([PA_INKSCAPE], inkscape)
159 AC_PATH_TOOL([PA_PYTHON], python)
160 AC_PATH_TOOL([PA_TOUCH], touch)
161 AC_PATH_TOOL([PA_DBLATEX], dblatex)
162 AC_PATH_TOOL([PA_XMLTO], xmlto)
164 AS_IF( [ test x$PA_DOXYGEN = x -o x$PA_LYX = x -o \
165 x$PA_INKSCAPE = x -o x$PA_PYTHON = x -o \
167 [ has_doc_tools="no";
168 AC_MSG_WARN([Some essential doc-tool is missing]) ],
169 [ has_doc_tools="yes";
174 AS_IF( [ test x$has_doc_tools == "xno" -o x$PA_DBLATEX = x ],
175 [ can_make_pdfs="no";
176 AC_WARN([No PDF documentation will be generated]) ],
177 [ can_make_pdfs="yes"]
180 AS_IF([ test x$has_doc_tools == "xno" -o x$PA_XMLTO = x ],
181 [ can_make_html="no";
182 AC_WARN([No HTML documentation will be generated]) ],
183 [ can_make_html="yes" ]
187 AM_CONDITIONAL(BUILD_DOCUMENTATION, [ test x$has_doc_tools = "xyes" ])
188 AM_CONDITIONAL(BUILD_PDF_DOCUMENTS, [ test x$can_make_pdfs = "xyes" ])
189 AM_CONDITIONAL(BUILD_HTML_DOCUMENTS, [ test x$can_make_html = "xyes" ])
191 AC_SUBST(PA_DOCDIR, [`pwd`/doc])
192 AC_SUBST(PA_FIGDIR, [$PA_DOCDIR/common/figures])
193 AC_SUBST(PA_MAKE_DOCRULES, [$PA_DOCDIR/Makefile.rules])
194 AC_SUBST(PA_DOCSCRIPT_DIR, [$PA_DOCDIR/scripts])
195 AC_SUBST(PA_DBLYXFIX, [$PA_DOCSCRIPT_DIR/dblyxfix.py])
196 AC_SUBST(PA_DOXML2DB, [$PA_DOCSCRIPT_DIR/doxml2db.py])
197 AC_SUBST(PA_DOXYDEPS, [$PA_DOCSCRIPT_DIR/doxydeps.py])
201 SHAVE_INIT([build-aux], [enable])
205 build-aux/shave-libtool
211 doc/murphy-audio/Makefile
212 doc/murphy-audio/db/Makefile
217 ---{ $PACKAGE_NAME $VERSION }---
220 sysconfdir: ${sysconfdir}
221 localstatedir: ${localstatedir}
222 modlibexecdir: ${modlibexecdir}
226 LIBPULSE_CFLAGS: ${LIBPULSE_CFLAGS}
227 LIBPULSE_LIBS: ${LIBPULSE_LIBS}
228 LIBPULSECORE_CFLAGS: ${LIBPULSECORE_CFLAGS}
229 LIBPULSECORE_LIBS: ${LIBPULSECORE_LIBS}
230 PULSEDEVEL_CFLAGS ${PULSEDEVEL_CFLAGS}
231 PULSEDEVEL_LIBS ${PULSEDEVEL_LIBS}
232 MAJORMINOR: ${PA_MAJORMINOR}
233 DBUS_CFLAGS: ${DBUS_CFLAGS}
234 DBUS_LIBS: ${DBUS_LIBS}
235 MURPHYCOMMON_CFLAGS ${MURPHYCOMMON_CFLAGS}
236 MURPHYCOMMON_LIBS ${MURPHYCOMMON_LIBS}
237 LUAUTILS_CFLAGS ${LUAUTILS_CFLAGS}
238 LUAUTILS_LIBS ${LUAUTILS_LIBS}
239 LUAUTILS_CFLAGS ${LUAUTILS_CFLAGS}
240 LUAUTILS_LIBS ${LUAUTILS_LIBS}
241 LUA_CFLAGS: ${LUA_CFLAGS}
242 LUA_LIBS: ${LUA_LIBS}
243 AUL_CFLAGS ${AUL_CFLAGS}
245 murphyif enabled: $build_with_murphyif
246 MURPHYIF_CFLAGS ${MURPHYIF_CFLAGS}
247 MURPHYIF_LIBS ${MURPHYIF_LIBS}