2 # Process this file with autoconf to produce a configure script.
4 # This file is part of libflashsupport-pulse.
6 # libflashsupport-pulse is free software; you can redistribute it
7 # and/or modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either version
9 # 2 of the License, or (at your option) any later version.
11 # libflashsupport-pulse is distributed in the hope that it will be
12 # useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with libflashsupport-pulse; if not, write to the Free
18 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 AC_INIT([libflashsupport-pulse], 000, [mzcbylcnhqvb (at) 0pointer (dot) de])
24 AC_CONFIG_SRCDIR([flashsupport.c])
25 AC_CONFIG_HEADERS([config.h])
26 AM_INIT_AUTOMAKE([foreign -Wall])
30 AC_PROG_GCC_TRADITIONAL
36 AC_LANG_CONFTEST([int main() {}])
37 $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
43 # If using GCC specify some additional parameters
44 if test "x$GCC" = "xyes" ; then
46 # We use gnu99 instead of c99 because many have interpreted the standard
47 # in a way that int64_t isn't defined on non-64 bit platforms.
48 DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -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 -Winline -Wno-unused-parameter -ffast-math"
50 for flag in $DESIRED_FLAGS ; do
51 AC_MSG_CHECKING([whether $CC accepts $flag])
52 if test_gcc_flag $flag ; then
53 CFLAGS="$CFLAGS $flag"
66 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
68 if test x"$have_pkg_config" = "xno"; then
69 AC_MSG_ERROR(pkg-config is required to install this program)
74 if test x"$PULSEAUDIO_SOURCES" != x ; then
75 PULSE_CFLAGS="-I${PULSEAUDIO_SOURCES}/src"
76 PULSE_LIBS="-L${PULSEAUDIO_SOURCES}/src/.libs -lpulse"
77 echo "*** Using manually configured PA instance in ${PULSEAUDIO_SOURCES} ***"
78 elif test -d ../pulseaudio ; then
79 PULSE_CFLAGS='-I$(top_srcdir)/../pulseaudio/src'
80 PULSE_LIBS='-L$(top_srcdir)/../pulseaudio/src/.libs -lpulse'
81 echo "*** Found pulseaudio in ../pulseaudio, using that version ***"
83 PKG_CHECK_MODULES(PULSE, [ libpulse >= 0.9.5 ])
87 AC_SUBST(PULSE_CFLAGS)
89 PKG_CHECK_MODULES(LIBSSL, [ libssl ])
92 AC_SUBST(LIBSSL_CFLAGS)
94 AC_CONFIG_FILES([Makefile])