]> code.delx.au - pulseaudio/blob - configure.ac
move sample cache to namereg
[pulseaudio] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 # $Id$
5
6 # This file is part of polypaudio.
7 #
8 # polypaudio is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU 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.
12 #
13 # polypaudio 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.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with polypaudio; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21
22 AC_PREREQ(2.57)
23 AC_INIT([polypaudio],[0.2],[mzcbylcnhqvb (at) 0pointer (dot) de])
24 AC_CONFIG_SRCDIR([polyp/main.c])
25 AC_CONFIG_HEADERS([config.h])
26 AM_INIT_AUTOMAKE([foreign -Wall])
27
28 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/polypaudio/])
29
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}"
33 fi
34
35 # Checks for programs.
36 AC_PROG_CC
37 AC_LIBLTDL_INSTALLABLE
38 AC_SUBST(INCLTDL)
39 AC_SUBST(LIBLTDL)
40 AC_LIBTOOL_DLOPEN
41 AC_PROG_LIBTOOL
42
43 # Checks for header files.
44 AC_HEADER_STDC
45 AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
46
47 ACX_PTHREAD
48 AC_PATH_XTRA
49 AM_CONDITIONAL(X_DISPLAY_MISSING, test "x$X_DISPLAY_MISSING" != "x")
50
51 # Checks for typedefs, structures, and compiler characteristics.
52 AC_C_CONST
53 AC_TYPE_PID_T
54 AC_TYPE_SIZE_T
55 AC_HEADER_TIME
56
57 # Checks for library functions.
58 AC_FUNC_FORK
59 AC_PROG_GCC_TRADITIONAL
60 AC_FUNC_LSTAT
61 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
62 AC_FUNC_MALLOC
63 AC_FUNC_MEMCMP
64 AC_FUNC_MMAP
65 AC_FUNC_REALLOC
66 AC_FUNC_SETPGRP
67 AC_TYPE_SIGNAL
68 AC_CHECK_FUNCS([gethostname gettimeofday memchr memmove memset mkdir mkfifo munmap rmdir socket strcspn strerror strrchr strspn strstr strtol strtoul])
69
70 AC_C_BIGENDIAN
71
72 PKG_CHECK_MODULES(LIBSAMPLERATE, [ samplerate >= 0.1.0 ])
73 AC_SUBST(LIBSAMPLERATE_CFLAGS)
74 AC_SUBST(LIBSAMPLERATE_LIBS)
75
76 PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.0 ])
77 AC_SUBST(LIBSNDFILE_CFLAGS)
78 AC_SUBST(LIBSNDFILE_LIBS)
79
80 PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ])
81 AC_SUBST(ASOUNDLIB_CFLAGS)
82 AC_SUBST(ASOUNDLIB_LIBS)
83
84 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
85 AC_SUBST(GLIB20_CFLAGS)
86 AC_SUBST(GLIB20_LIBS)
87
88 # If using GCC specifiy some additional parameters
89 if test "x$GCC" = "xyes" ; then
90 CFLAGS="$CFLAGS -pipe -W -Wall -Wno-unused-parameter -pedantic -std=c99"
91 fi
92
93 # LYNX documentation generation
94 AC_ARG_ENABLE(lynx,
95 AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
96 [case "${enableval}" in
97 yes) lynx=yes ;;
98 no) lynx=no ;;
99 *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
100 esac],[lynx=yes])
101
102 if test x$lynx = xyes ; then
103 AC_CHECK_PROG(have_lynx, lynx, yes, no)
104
105 if test x$have_lynx = xno ; then
106 AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
107 fi
108 fi
109
110 AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
111
112 AM_CONDITIONAL(BUILD_LIBPOLYPCORE, false)
113
114 AC_CONFIG_FILES([Makefile polyp/Makefile polyplib.pc polyplib-simple.pc polyplib-mainloop.pc polyplib-error.pc polyplib-glib-mainloop.pc doc/Makefile doc/README.html doc/cli.html doc/daemon.html doc/modules.html doxygen/Makefile doxygen/doxygen.conf polyp/polyplib-version.h])
115 AC_OUTPUT