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)
73 PKG_CHECK_MODULES(DBUS, [dbus-1])
80 AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${LIBDIR}/pulse-${PA_MAJORMINOR}/modules/]),
81 [modlibexecdir=$withval], [modlibexecdir=${LIBDIR}/pulse-${PA_MAJORMINOR}/modules])
84 AC_SUBST(modlibexecdir)
88 AC_ARG_WITH([documentation],
89 [AS_HELP_STRING([--with-documentation],
90 [generate pdf, html and other doc files])],
92 [with_documentation=auto]
95 AS_IF( [ test x$with_documentation = xno ],
96 [ has_doc_tools="no" ],
97 [ AC_PATH_TOOL([PA_DOXYGEN], doxygen)
98 AC_PATH_TOOL([PA_LYX], lyx)
99 AC_PATH_TOOL([PA_INKSCAPE], inkscape)
100 AC_PATH_TOOL([PA_PYTHON], python)
101 AC_PATH_TOOL([PA_TOUCH], touch)
102 AC_PATH_TOOL([PA_DBLATEX], dblatex)
103 AC_PATH_TOOL([PA_XMLTO], xmlto)
105 AS_IF( [ test x$PA_DOXYGEN = x -o x$PA_LYX = x -o \
106 x$PA_INKSCAPE = x -o x$PA_PYTHON = x -o \
108 [ has_doc_tools="no";
109 AC_MSG_WARN([Some essential doc-tool is missing]) ],
110 [ has_doc_tools="yes";
115 AS_IF( [ test x$has_doc_tools == "xno" -o x$PA_DBLATEX = x ],
116 [ can_make_pdfs="no";
117 AC_WARN([No PDF documentation will be generated]) ],
118 [ can_make_pdfs="yes"]
121 AS_IF([ test x$has_doc_tools == "xno" -o x$PA_XMLTO = x ],
122 [ can_make_html="no";
123 AC_WARN([No HTML documentation will be generated]) ],
124 [ can_make_html="yes" ]
128 AM_CONDITIONAL(BUILD_DOCUMENTATION, [ test x$has_doc_tools = "xyes" ])
129 AM_CONDITIONAL(BUILD_PDF_DOCUMENTS, [ test x$can_make_pdfs = "xyes" ])
130 AM_CONDITIONAL(BUILD_HTML_DOCUMENTS, [ test x$can_make_html = "xyes" ])
132 AC_SUBST(PA_DOCDIR, [`pwd`/doc])
133 AC_SUBST(PA_FIGDIR, [$PA_DOCDIR/common/figures])
134 AC_SUBST(PA_MAKE_DOCRULES, [$PA_DOCDIR/Makefile.rules])
135 AC_SUBST(PA_DOCSCRIPT_DIR, [$PA_DOCDIR/scripts])
136 AC_SUBST(PA_DBLYXFIX, [$PA_DOCSCRIPT_DIR/dblyxfix.py])
137 AC_SUBST(PA_DOXML2DB, [$PA_DOCSCRIPT_DIR/doxml2db.py])
138 AC_SUBST(PA_DOXYDEPS, [$PA_DOCSCRIPT_DIR/doxydeps.py])
142 SHAVE_INIT([build-aux], [enable])
146 build-aux/shave-libtool
151 doc/murphy-audio/Makefile
152 doc/murphy-audio/db/Makefile
157 ---{ $PACKAGE_NAME $VERSION }---
160 sysconfdir: ${sysconfdir}
161 localstatedir: ${localstatedir}
162 modlibexecdir: ${modlibexecdir}
166 LIBPULSE_CFLAGS: ${LIBPULSE_CFLAGS}
167 LIBPULSE_LIBS: ${LIBPULSE_LIBS}
168 LIBPULSECORE_CFLAGS: ${LIBPULSECORE_CFLAGS}
169 LIBPULSECORE_LIBS: ${LIBPULSECORE_LIBS}
170 MAJORMINOR: ${PA_MAJORMINOR}
171 DBUS_CFLAGS: ${DBUS_CFLAGS}
172 DBUS_LIBS: ${DBUS_LIBS}
173 PD_SUPPORT: ${PD_SUPPORT}