fix tabs
[gst-pulse.git] / configure.ac
blobaab31420c5df2a810fb9bc6b4f60e049749c69e5
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 # $Id$
6 # This file is part of gst-pulse.
8 # gst-pulse is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU Lesser General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # gst-pulse is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public License
19 # along with gst-pulse; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
22 AC_PREREQ(2.57)
23 AC_INIT([gst-pulse],[0.9.5],[mztfgchyfr (at) 0pointer (dot) de])
24 AC_CONFIG_SRCDIR([src/plugin.c])
25 AC_CONFIG_HEADERS([config.h])
26 AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
28 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/gst-pulse/])
30 if type -p stow > /dev/null && test -d /usr/local/stow ; then
31    AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
32    ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
35 # Checks for programs.
36 AC_PROG_CC
37 AC_PROG_LN_S
38 AC_DISABLE_STATIC
39 AC_PROG_LIBTOOL
41 AC_CHECK_FUNCS([gethostname]) 
42 AC_CHECK_HEADERS([limits.h])
43 AC_C_CONST
44 AC_FUNC_MALLOC
45 AC_TYPE_SIZE_T
47 PKG_PROG_PKG_CONFIG
49 if test -d ../pulseaudio ; then
50    PULSE_CFLAGS='-I$(top_srcdir)/../pulseaudio/src'
51    PULSE_LIBS='-L$(top_srcdir)/../pulseaudio/src/.libs -lpulse'
52    echo "*** Found pulseaudio in ../pulseaudio, using that version ***"
53 else
54    PKG_CHECK_MODULES(PULSE, [ libpulse >= 0.9.2 ])
57 AC_SUBST(PULSE_LIBS)
58 AC_SUBST(PULSE_CFLAGS)
60 PKG_CHECK_MODULES(GST, [ gstreamer-0.10 >= 0.10 gstreamer-plugins-base-0.10 >= 0.10 ])
62 GST_MODDIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-0.10`
64 AC_SUBST(GST_LIBS)
65 AC_SUBST(GST_CFLAGS)
66 AC_SUBST(GST_MODDIR)
68 # If using GCC specifiy some additional parameters
69 if test "x$GCC" = "xyes" ; then
70    CFLAGS="$CFLAGS -pipe -Wall -W -Wno-unused-parameter"
73 # LYNX documentation generation
74 AC_ARG_ENABLE(lynx,
75         AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
76 [case "${enableval}" in
77   yes) lynx=yes ;;
78   no)  lynx=no ;;
79   *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
80 esac],[lynx=yes])
82 if test x$lynx = xyes ; then
83    AC_CHECK_PROG(have_lynx, lynx, yes, no)
85    if test x$have_lynx = xno ; then
86      AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
87    fi
90 AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
92 AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile doc/README.html])
93 AC_OUTPUT