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_MACRO_DIR([m4])
10 AM_INIT_AUTOMAKE([foreign 1.8.5 -Wall])
13 # this would not be really needed if everything would be as it should be
14 AS_IF([test x${exec_prefix} = xNONE], [LIBDIR=$ac_default_prefix/lib], [LIBDIR=${libdir}])
17 AC_SUBST(PA_MAJORMINOR, [PAVER])
23 AC_PROG_GCC_TRADITIONAL
24 AC_USE_SYSTEM_EXTENSIONS
26 AC_PATH_PROG([M4], [m4 gm4], [no])
27 if test "x$M4" = xno ; then
28 AC_MSG_ERROR([m4 missing])
31 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
34 #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"
36 #for flag in $DESIRED_FLAGS ; do
37 # CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
40 AC_LTDL_ENABLE_INSTALL
41 AC_LIBLTDL_INSTALLABLE
47 AC_CONFIG_SUBDIRS(libltdl)
54 AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
55 [Define ssize_t if it is not done by the standard libs.])])
59 AC_CHECK_DECLS(environ)
61 AC_DEFINE_UNQUOTED(PA_CFLAGS,"$CFLAGS", [The CFLAGS used during compilation])
63 PKG_CHECK_MODULES(LIBPULSE, [libpulse])
64 AC_SUBST(LIBPULSE_CFLAGS)
65 AC_SUBST(LIBPULSE_LIBS)
68 PKG_CHECK_MODULES(PULSEDEVEL, [pulseaudio-module-devel])
69 AC_SUBST(PULSEDEVEL_CFLAGS)
70 AC_SUBST(PULSEDEVEL_LIBS)
75 [ AS_HELP_STRING([--with-dbus],
76 [Use D-Bus towards with Murphy and AudioManager])
78 [ build_with_dbus="yes" ;
79 PKG_CHECK_MODULES(DBUS, [dbus-1])
83 [ build_with_dbus="no" ]
86 AM_CONDITIONAL(BUILD_WITH_DBUS, [ test "x$build_with_dbus" = "xyes" ])
90 AC_ARG_WITH([module-dir],
91 [AS_HELP_STRING([--with-module-dir], [Directory where to install the modules to (defaults to ${LIBDIR}/pulse-${PA_MAJORMINOR}/modules/])],
92 [modlibexecdir=$withval],
93 [modlibexecdir=${LIBDIR}/pulse-${PA_MAJORMINOR}/modules]
96 AC_SUBST(modlibexecdir)
100 AC_ARG_WITH([documentation],
101 [AS_HELP_STRING([--with-documentation],
102 [generate pdf, html and other doc files])],
104 [with_documentation=auto]
107 AS_IF( [ test x$with_documentation = xno ],
108 [ has_doc_tools="no" ],
109 [ AC_PATH_TOOL([PA_DOXYGEN], doxygen)
110 AC_PATH_TOOL([PA_LYX], lyx)
111 AC_PATH_TOOL([PA_INKSCAPE], inkscape)
112 AC_PATH_TOOL([PA_PYTHON], python)
113 AC_PATH_TOOL([PA_TOUCH], touch)
114 AC_PATH_TOOL([PA_DBLATEX], dblatex)
115 AC_PATH_TOOL([PA_XMLTO], xmlto)
117 AS_IF( [ test x$PA_DOXYGEN = x -o x$PA_LYX = x -o \
118 x$PA_INKSCAPE = x -o x$PA_PYTHON = x -o \
120 [ has_doc_tools="no";
121 AC_MSG_WARN([Some essential doc-tool is missing]) ],
122 [ has_doc_tools="yes";
127 AS_IF( [ test x$has_doc_tools == "xno" -o x$PA_DBLATEX = x ],
128 [ can_make_pdfs="no";
129 AC_WARN([No PDF documentation will be generated]) ],
130 [ can_make_pdfs="yes"]
133 AS_IF([ test x$has_doc_tools == "xno" -o x$PA_XMLTO = x ],
134 [ can_make_html="no";
135 AC_WARN([No HTML documentation will be generated]) ],
136 [ can_make_html="yes" ]
140 AM_CONDITIONAL(BUILD_DOCUMENTATION, [ test x$has_doc_tools = "xyes" ])
141 AM_CONDITIONAL(BUILD_PDF_DOCUMENTS, [ test x$can_make_pdfs = "xyes" ])
142 AM_CONDITIONAL(BUILD_HTML_DOCUMENTS, [ test x$can_make_html = "xyes" ])
144 AC_SUBST(PA_DOCDIR, [`pwd`/doc])
145 AC_SUBST(PA_FIGDIR, [$PA_DOCDIR/common/figures])
146 AC_SUBST(PA_MAKE_DOCRULES, [$PA_DOCDIR/Makefile.rules])
147 AC_SUBST(PA_DOCSCRIPT_DIR, [$PA_DOCDIR/scripts])
148 AC_SUBST(PA_DBLYXFIX, [$PA_DOCSCRIPT_DIR/dblyxfix.py])
149 AC_SUBST(PA_DOXML2DB, [$PA_DOCSCRIPT_DIR/doxml2db.py])
150 AC_SUBST(PA_DOXYDEPS, [$PA_DOCSCRIPT_DIR/doxydeps.py])
154 SHAVE_INIT([build-aux], [enable])
158 build-aux/shave-libtool
164 doc/murphy-audio/Makefile
165 doc/murphy-audio/db/Makefile
170 ---{ $PACKAGE_NAME $VERSION }---
173 sysconfdir: ${sysconfdir}
174 localstatedir: ${localstatedir}
175 modlibexecdir: ${modlibexecdir}
179 LIBPULSE_CFLAGS: ${LIBPULSE_CFLAGS}
180 LIBPULSE_LIBS: ${LIBPULSE_LIBS}
181 LIBPULSECORE_CFLAGS: ${LIBPULSECORE_CFLAGS}
182 LIBPULSECORE_LIBS: ${LIBPULSECORE_LIBS}
183 MAJORMINOR: ${PA_MAJORMINOR}
184 DBUS_CFLAGS: ${DBUS_CFLAGS}
185 DBUS_LIBS: ${DBUS_LIBS}