upps fix uname -a to uname -m
[libflashsupport-jack.git] / configure.ac
blob5525d659d2a6b1009b35bafe64202abad6012d93
1 # -*- Autoconf -*-
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
19 # 02111-1307 USA.
21 AC_PREREQ(2.57)
23 AC_INIT([libflashsupport-jack], 000, [mzcbylcnhqvb (at) 0pointer (dot) de])
24 AC_CONFIG_SRCDIR([flashsupport.c])
25 AC_CONFIG_HEADERS([config.h])
26 AM_INIT_AUTOMAKE([foreign -Wall])
28 AC_PROG_CC
29 AM_PROG_CC_C_O
30 AC_PROG_GCC_TRADITIONAL
31 AC_GNU_SOURCE
33 # GCC flags
35 test_gcc_flag() {
36     AC_LANG_CONFTEST([int main() {}])
37     $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
38     ret=$?
39     rm -f conftest.o
40     return $ret
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="-pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -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"
54            AC_MSG_RESULT([yes])
55         else
56            AC_MSG_RESULT([no])
57         fi
58     done 
61 AM_DISABLE_STATIC
62 AC_PROG_LIBTOOL
64 AC_HEADER_STDC
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)
72 PKG_PROG_PKG_CONFIG
74 PKG_CHECK_MODULES(JACK, [jack])
76 AC_SUBST(JACK_LIBS)
77 AC_SUBST(JACK_CFLAGS)
79 PKG_CHECK_MODULES(SRC, [samplerate >= 0.1])
81 AC_SUBST(SRC_LIBS)
82 AC_SUBST(SRC_CFLAGS)
85 PKG_CHECK_MODULES(LIBSSL, [ libssl ])
87 AC_SUBST(LIBSSL_LIBS)
88 AC_SUBST(LIBSSL_CFLAGS)
90 AC_CONFIG_FILES([Makefile])
92 AC_OUTPUT