bluetooth: rework the info_valid logic to be more tolerant
[pulseaudio-mirror.git] / configure.ac
blob049589d457b0d7dba39221879c6dbe5837268c48
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 # This file is part of PulseAudio.
6 # Copyright 2004-2008 Lennart Poettering
7 # Copyright 2006-2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
9 # PulseAudio is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU Lesser General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
14 # PulseAudio is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU Lesser General Public License
20 # along with PulseAudio; if not, write to the Free Software Foundation,
21 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
23 AC_PREREQ(2.63)
25 m4_define(pa_major, [0])
26 m4_define(pa_minor, [9])
27 m4_define(pa_micro, [15])
29 AC_INIT([pulseaudio],[pa_major.pa_minor.pa_micro-test3],[mzchyfrnhqvb (at) 0pointer (dot) net])
30 AC_CONFIG_SRCDIR([src/daemon/main.c])
31 AC_CONFIG_MACRO_DIR([m4])
32 AC_CONFIG_HEADERS([config.h])
33 AM_INIT_AUTOMAKE([foreign 1.10 -Wall -Wno-portability])
35 AC_SUBST(PA_MAJOR, pa_major)
36 AC_SUBST(PA_MINOR, pa_minor)
37 AC_SUBST(PA_MICRO, pa_micro)
38 AC_SUBST(PA_MAJORMINOR, pa_major.pa_minor)
39 AC_SUBST(PA_MAJORMINORMICRO, pa_major.pa_minor.pa_micro)
40 AC_SUBST(PACKAGE_URL, [http://pulseaudio.org/])
42 AC_SUBST(PA_API_VERSION, 12)
43 AC_SUBST(PA_PROTOCOL_VERSION, 15)
45 # The stable ABI for client applications, for the version info x:y:z
46 # always will hold y=z
47 AC_SUBST(LIBPULSE_VERSION_INFO, [8:0:8])
49 # A simplified, synchronous, ABI-stable interface for client
50 # applications, for the version info x:y:z always will hold y=z
51 AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:2:0])
53 # The ABI-stable network browsing interface for client applications,
54 # for the version info x:y:z always will hold y=z
55 AC_SUBST(LIBPULSE_BROWSE_VERSION_INFO, [1:1:1])
57 # The ABI-stable GLib adapter for client applications, for the version
58 # info x:y:z always will hold y=z
59 AC_SUBST(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO, [0:4:0])
61 AC_CANONICAL_HOST
62 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
64 if type -p stow > /dev/null && test -d /usr/local/stow ; then
65    AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
66    ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
69 #### Platform hacks ####
71 case $host in
72    *-*-solaris* )
73       AC_DEFINE(_XOPEN_SOURCE,        600, Needed to get declarations for msg_control and msg_controllen on Solaris)
74       AC_DEFINE(__EXTENSIONS__,         1, Needed to get declarations for msg_control and msg_controllen on Solaris)
75       ;;
76 esac
78 #### Checks for programs. ####
80 # mkdir -p
82 AC_PROG_MKDIR_P
84 # CC
86 AC_PROG_CC
87 AC_PROG_CC_C99
88 AM_PROG_CC_C_O
89 AC_PROG_GCC_TRADITIONAL
90 AC_USE_SYSTEM_EXTENSIONS
92 # M4
94 AC_CHECK_PROGS([M4], gm4 m4, no)
95 if test "x$M4" = xno ; then
96    AC_MSG_ERROR([m4 missing])
99 # Linker
101 AC_PROG_LD
102 AC_PROG_LD_GNU
104 AC_SUBST(HAVE_GNU_LD)
105 AM_CONDITIONAL([HAVE_GNU_LD], [test "x$HAVE_GNU_LD" = x1])
108 dnl Compiler flags
109 DESIRED_FLAGS="-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option"
111 for flag in $DESIRED_FLAGS ; do
112   CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
113 done
115 dnl Check whether to build tests by default (as compile-test) or not
116 AC_ARG_ENABLE([default-build-tests],
117     AS_HELP_STRING([--disable-default-build-tests], [Build test programs only during make check]))
119 AM_CONDITIONAL([BUILD_TESTS_DEFAULT], [test "x$enable_default_build_tests" != "xno"])
121 # Native atomic operation support
122 AC_ARG_ENABLE([atomic-arm-linux-helpers],
123     AS_HELP_STRING([--disable-atomic-arm-linux-helpers],[use inline asm or libatomic_ops instead]),
124         [
125             case "${enableval}" in
126                 yes) atomic_arm_linux_helpers=yes ;;
127                 no) atomic_arm_linux_helpers=no ;;
128                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-atomic-arm-linux-helpers) ;;
129             esac
130         ],
131         [atomic_arm_linux_helpers=auto])
133 AC_ARG_ENABLE([atomic-arm-memory-barrier],
134     AS_HELP_STRING([--enable-atomic-arm-memory-barrier],[only really needed in SMP arm systems]),
135         [
136             case "${enableval}" in
137                 yes) AC_DEFINE_UNQUOTED(ATOMIC_ARM_MEMORY_BARRIER_ENABLED, 1, [Enable memory barriers]) ;;
138                 no) ;;
139                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-atomic-arm-linux-helpers) ;;
140             esac
141         ],)
143 AC_ARG_ENABLE([netbsd-atomic-ops],
144     AS_HELP_STRING([--enable-netbsd-atomic-ops],[Use the native NetBSD atomic_ops implementation]),
145         [
146             case "${enableval}" in
147                 yes) atomic_netbsd_helpers=yes ;;
148                 no) atomic_netbsd_helpers=no ;;
149                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-netbsd-atomic-ops) ;;
150             esac
151         ],
152         [atomic_netbsd_helpers=auto])
154 AC_MSG_CHECKING([target operating system])
155 case $host in
156         *-*-linux*)
157             AC_MSG_RESULT([linux])
158             pulse_target_os=linux
159         ;;
160         *-*-netbsd*)
161             AC_MSG_RESULT([netbsd])
162             pulse_target_os=netbsd
163         ;;
164         *)
165             AC_MSG_RESULT([unknown])
166             pulse_target_os=unknown
167         ;;
168 esac
170 # If everything else fails use libatomic_ops
171 need_libatomic_ops=yes
173 AC_CACHE_CHECK([whether $CC knows __sync_bool_compare_and_swap()],
174   pulseaudio_cv_sync_bool_compare_and_swap,
175   [AC_LINK_IFELSE(
176      AC_LANG_PROGRAM([], [[int a = 4; __sync_bool_compare_and_swap(&a, 4, 5);]]),
177      [pulseaudio_cv_sync_bool_compare_and_swap=yes],
178      [pulseaudio_cv_sync_bool_compare_and_swap=no])
179   ])
181 if test "$pulseaudio_cv_sync_bool_compare_and_swap" = "yes" ; then
182     AC_DEFINE([HAVE_ATOMIC_BUILTINS], 1, [Have __sync_bool_compare_and_swap() and friends.])
183     need_libatomic_ops=no
184 else
185     # HW specific atomic ops stuff
186     AC_MSG_CHECKING([architecture for native atomic operations])
187     case $host_cpu in
188         arm*)
189             AC_MSG_RESULT([arm])
190             AC_MSG_CHECKING([whether we can use Linux kernel helpers])
191             # The Linux kernel helper functions have been there since 2.6.16. However
192             # compile time checking for kernel version in cross compile environment
193             # (which is usually the case for arm cpu) is tricky (or impossible).
194             if test "x$pulse_target_os" = "xlinux" && test "x$atomic_arm_linux_helpers" != "xno"; then
195                 AC_MSG_RESULT([yes])
196                 AC_DEFINE_UNQUOTED(ATOMIC_ARM_LINUX_HELPERS, 1, [special arm linux implementation])
197                 need_libatomic_ops=no
198             else
199                AC_MSG_RESULT([no])
200                AC_CACHE_CHECK([compiler support for arm inline asm atomic operations],
201                  pulseaudio_cv_support_arm_atomic_ops,
202                  [AC_COMPILE_IFELSE(
203                     AC_LANG_PROGRAM([],
204                       [[volatile int a=0;
205                         int o=0, n=1, r;
206                         asm volatile ("ldrex    %0, [%1]\n"
207                                          "subs  %0, %0, %2\n"
208                                          "strexeq %0, %3, [%1]\n"
209                                          : "=&r" (r)
210                                          : "r" (&a), "Ir" (o), "r" (n)
211                                          : "cc");
212                         return (a==1 ? 0 : -1);
213                       ]]),
214                     [pulseaudio_cv_support_arm_atomic_ops=yes],
215                     [pulseaudio_cv_support_arm_atomic_ops=no])
216                  ])
217                AS_IF([test "$pulseaudio_cv_support_arm_atomic_ops" = "yes"], [
218                    AC_DEFINE([ATOMIC_ARM_INLINE_ASM], 1, [Have ARMv6 instructions.])
219                    need_libatomic_ops=no
220                  ])
221            fi
222         ;;
223         *)
224             if test "x$pulse_target_os" = "xnetbsd" && test "x$atomic_netbsd_helpers" = "xyes"; then
225                 AC_MSG_RESULT([yes])
226                 AC_DEFINE_UNQUOTED(NETBSD_ATOMIC_OPS, 1, [netbsd implementation])
227                 need_libatomic_ops=no
228             else
229                 AC_MSG_RESULT([unknown])
230             fi
231         ;;
232     esac
235 CC_CHECK_TLS
237 AC_CACHE_CHECK([whether $CC knows _Bool],
238   pulseaudio_cv__Bool,
239   [AC_COMPILE_IFELSE(
240      AC_LANG_PROGRAM([], [[_Bool b;]]),
241      [pulseaudio_cv__Bool=yes],
242      [pulseaudio_cv__Bool=no])
243   ])
245 AS_IF([test "$pulseaudio_cv__Bool" = "yes"], [
246     AC_DEFINE([HAVE_STD_BOOL], 1, [Have _Bool.])
247   ])
249 #### libtool stuff ####
250 LT_PREREQ(2.2)
251 LT_INIT([dlopen win32-dll disable-static])
253 dnl Unfortunately, even up to libtool 2.2.6a there is no way to know
254 dnl exactly which version of libltdl is present in the system, so we
255 dnl just assume that it's a working version as long as we have the
256 dnl library and the header files.
258 dnl As an extra safety device, check for lt_dladvise_init() which is
259 dnl only implemented in libtool 2.x, and refine as we go if we have
260 dnl refined requirements.
262 dnl Check the header files first since the system may have a
263 dnl libltdl.so for runtime, but no headers, and we want to bail out as
264 dnl soon as possible.
266 dnl We don't need any special variable for this though, since the user
267 dnl can give the proper place to find libltdl through the standard
268 dnl variables like LDFLAGS and CPPFLAGS.
270 AC_CHECK_HEADER([ltdl.h],
271     [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
272     [LIBLTDL=])
274 AS_IF([test "x$LIBLTDL" = "x"],
275     [AC_MSG_ERROR([Unable to find libltdl.])])
276 AC_SUBST([LIBLTDL])
278 #### Determine build environment ####
280 os_is_win32=0
282 case "$host_os" in
283         mingw*)
284         AC_DEFINE([OS_IS_WIN32], 1, [Build target is Windows.])
285         os_is_win32=1
286                 ;;
287         esac
289 AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1")
291 ###################################
292 #   Basic environment checks      #
293 ###################################
295 #### Checks for header files. ####
297 # ISO
298 AC_HEADER_STDC
300 # POSIX
301 AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
302     netinet/in_systm.h netinet/tcp.h poll.h pwd.h sched.h \
303     sys/mman.h sys/resource.h sys/select.h sys/socket.h sys/wait.h \
304     sys/uio.h syslog.h sys/dl.h dlfcn.h linux/sockios.h])
305 AC_CHECK_HEADERS([netinet/ip.h], [], [],
306                  [#include <sys/types.h>
307                   #if HAVE_NETINET_IN_H
308                   # include <netinet/in.h>
309                   #endif
310                   #if HAVE_NETINET_IN_SYSTM_H
311                   # include <netinet/in_systm.h>
312                   #endif
313                  ])
314 AC_CHECK_HEADERS([regex.h], [HAVE_REGEX=1], [HAVE_REGEX=0])
315 AC_CHECK_HEADERS([sys/un.h], [HAVE_AF_UNIX=1], [HAVE_AF_UNIX=0])
317 AM_CONDITIONAL(HAVE_REGEX, test "x$HAVE_REGEX" = "x1")
318 AM_CONDITIONAL(HAVE_AF_UNIX, test "x$HAVE_AF_UNIX" = "x1")
320 # Linux
321 AC_CHECK_HEADERS([linux/input.h], [HAVE_EVDEV=1], [HAVE_EVDEV=0])
323 AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = "x1"])
325 AC_CHECK_HEADERS([sys/prctl.h])
327 # Solaris
328 AC_CHECK_HEADERS([sys/filio.h])
330 # Windows
331 AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
333 # NetBSD
334 AC_CHECK_HEADERS([sys/atomic.h])
336 # Other
337 AC_CHECK_HEADERS([sys/ioctl.h])
338 AC_CHECK_HEADERS([byteswap.h])
339 AC_CHECK_HEADERS([sys/syscall.h])
340 AC_CHECK_HEADERS([sys/eventfd.h])
341 AC_CHECK_HEADERS([execinfo.h])
343 #### Typdefs, structures, etc. ####
345 AC_C_CONST
346 AC_C_BIGENDIAN
347 AC_TYPE_PID_T
348 AC_TYPE_SIZE_T
349 AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
350     [Define ssize_t if it is not done by the standard libs.])])
351 AC_TYPE_OFF_T
353 AC_TYPE_UID_T
354 AC_CHECK_DECLS(environ)
356 AC_CHECK_DEFINE([SIGXCPU], [signal.h], [
357 HAVE_SIGXCPU=1
358 AC_DEFINE([HAVE_SIGXCPU], 1, [Have SIGXCPU?])
359 ], [HAVE_SIGXCPU=0])
360 AM_CONDITIONAL(HAVE_SIGXCPU, test "x$HAVE_SIGXCPU" = "x1")
362 # Solaris lacks this
363 AC_CHECK_DEFINE([INADDR_NONE], [netinet/in.h], [],
364     [AC_CHECK_DEFINE([INADDR_NONE], [winsock2.h], [],
365         [AC_DEFINE([INADDR_NONE],  [0xffffffff], [Define INADDR_NONE if not found in <netinet/in.h>])])])
367 #### POSIX threads ####
369 ACX_PTHREAD
371 #### Check for libs ####
373 # ISO
374 AC_SEARCH_LIBS([pow], [m])
376 # POSIX
377 AC_SEARCH_LIBS([sched_setscheduler], [rt])
378 AC_SEARCH_LIBS([dlopen], [dl])
379 AC_SEARCH_LIBS([shm_open], [rt])
380 AC_SEARCH_LIBS([inet_ntop], [nsl])
381 AC_SEARCH_LIBS([timer_create], [rt])
383 # BSD
384 AC_SEARCH_LIBS([connect], [socket])
386 # Non-standard
388 # This magic is needed so we do not needlessly add static libs to the win32
389 # build, disabling its ability to make dlls.
390 AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])])
392 AC_CHECK_LIB(gdbm, gdbm_open)
393 AC_CHECK_HEADERS(gdbm.h, [], [AC_MSG_ERROR([gdbm.h not found])])
395 #### Check for functions ####
397 # ISO
398 AC_CHECK_FUNCS([lrintf strtof])
400 # POSIX
401 AC_FUNC_FORK
402 AC_FUNC_GETGROUPS
403 AC_FUNC_SELECT_ARGTYPES
404 AC_CHECK_FUNCS([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \
405     getpwnam_r getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \
406     pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \
407     sigaction sleep sysconf pthread_setaffinity_np])
408 AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
410 AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
412 # X/OPEN
413 AC_CHECK_FUNCS([readlink])
415 # SUSv2
416 AC_CHECK_FUNCS([ctime_r usleep])
418 # SUSv3
419 AC_CHECK_FUNCS([strerror_r])
421 # BSD
422 AC_CHECK_FUNCS([lstat])
424 # Non-standard
426 AC_CHECK_FUNCS([setresuid setresgid setreuid setregid seteuid setegid ppoll strsignal sig2str strtof_l])
428 AC_FUNC_ALLOCA
430 AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
431   pulseaudio_cv_PTHREAD_PRIO_INHERIT,
432   [save_CC=$CC; CC=$PTHREAD_CC
433    save_CFLAGS=$CFLAGS; CFLAGS=$PTHREAD_CFLAGS
434    save_LIBS=$LIBS; LIBS=$PTHREAD_LIBS
435    AC_LINK_IFELSE(
436      AC_LANG_PROGRAM(
437        [[
438          #include <pthread.h>
439        ]],
440        [[int i = PTHREAD_PRIO_INHERIT;]]),
441      [pulseaudio_cv_PTHREAD_PRIO_INHERIT=yes],
442      [pulseaudio_cv_PTHREAD_PRIO_INHERIT=no])
443    CC=$save_CC
444    CFLAGS=$save_CFLAGS
445    LIBS=$save_LIBS
446   ])
448 AS_IF([test "$pulseaudio_cv_PTHREAD_PRIO_INHERIT" = "yes"], [
449     AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])
450   ])
452 AC_DEFINE_UNQUOTED(PA_CFLAGS,"$CFLAGS", [The CFLAGS used during compilation])
454 #### Large File-Support (LFS) ####
456 AC_SYS_LARGEFILE
458 # Check for open64 to know if the current system does have open64() and similar functions
459 AC_CHECK_FUNCS([open64])
461 #### [lib]iconv ####
463 AM_ICONV
465 IT_PROG_INTLTOOL([0.35.0])
466 GETTEXT_PACKAGE=pulseaudio
467 AC_SUBST([GETTEXT_PACKAGE])
468 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
469 AM_GLIB_GNU_GETTEXT
471 pulselocaledir='${prefix}/${DATADIRNAME}/locale'
472 AC_SUBST(pulselocaledir)
474 ###################################
475 #      External libraries         #
476 ###################################
478 #### pkg-config ####
480 PKG_PROG_PKG_CONFIG
482 #### X11 (optional) ####
484 AC_ARG_ENABLE([x11],
485     AS_HELP_STRING([--disable-x11],[Disable optional X11 support]),
486         [
487             case "${enableval}" in
488                 yes) x11=yes ;;
489                 no) x11=no ;;
490                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-x11) ;;
491             esac
492         ],
493         [x11=auto])
495 if test "x${x11}" != xno ; then
496     PKG_CHECK_MODULES(X11, [ x11 ice sm xtst ],
497         HAVE_X11=1,
498         [
499             HAVE_X11=0
500             if test "x$x11" = xyes ; then
501                 AC_MSG_ERROR([*** X11 not found])
502             fi
503         ])
504 else
505     HAVE_X11=0
508 if test "x${HAVE_X11}" = x1 ; then
509    AC_DEFINE([HAVE_X11], 1, [Have X11?])
512 AC_SUBST(X11_CFLAGS)
513 AC_SUBST(X11_LIBS)
514 AC_SUBST(HAVE_X11)
515 AM_CONDITIONAL([HAVE_X11], [test "x$HAVE_X11" = x1])
517 #### Capabilities (optional) ####
519 CAP_LIBS=''
521 AC_ARG_WITH(
522         [caps],
523         AS_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.]))
525 if test "x${with_caps}" != "xno"; then
526     AC_SEARCH_LIBS([cap_init], [cap], [], [
527                     if test "x${with_caps}" = "xyes" ; then
528                         AC_MSG_ERROR([*** POSIX caps libraries not found])
529                     fi])
530     AC_CHECK_HEADERS([sys/capability.h], [], [
531                     if test "x${with_caps}" = "xyes" ; then
532                         AC_MSG_ERROR([*** POSIX caps headers not found])
533                     fi])
536 #### Valgrind (optional) ####
538 AC_CHECK_HEADERS([valgrind/memcheck.h])
540 #### Sound file ####
542 PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
543 AC_SUBST(LIBSNDFILE_CFLAGS)
544 AC_SUBST(LIBSNDFILE_LIBS)
546 PKG_CHECK_MODULES(LIBSPEEX, [ speexdsp >= 1.2 ])
547 AC_SUBST(LIBSPEEX_CFLAGS)
548 AC_SUBST(LIBSPEEX_LIBS)
550 #### atomic-ops ###
552 AC_MSG_CHECKING([whether we need libatomic_ops])
553 if test "x$need_libatomic_ops" = "xyes"; then
554    AC_MSG_RESULT([yes])
555    AC_CHECK_HEADERS([atomic_ops.h], [], [
556    AC_MSG_ERROR([*** libatomic-ops headers not found])
557    ])
559    # Win32 does not need the lib and breaks horribly if we try to include it
560    if test "x$os_is_win32" != "x1" ; then
561        LIBS="$LIBS -latomic_ops"
562    fi
563 else
564    AC_MSG_RESULT([no])
567 #### Libsamplerate support (optional) ####
569 AC_ARG_ENABLE([samplerate],
570     AS_HELP_STRING([--disable-samplerate],[Disable optional libsamplerate support]),
571         [
572             case "${enableval}" in
573                 yes) samplerate=yes ;;
574                 no) samplerate=no ;;
575                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-samplerate) ;;
576             esac
577         ],
578         [samplerate=auto])
580 if test "x${samplerate}" != xno ; then
581     PKG_CHECK_MODULES(LIBSAMPLERATE, [ samplerate >= 0.1.0 ],
582         HAVE_LIBSAMPLERATE=1,
583         [
584             HAVE_LIBSAMPLERATE=0
585             if test "x$samplerate" = xyes ; then
586                 AC_MSG_ERROR([*** Libsamplerate not found])
587             fi
588         ])
589 else
590     HAVE_LIBSAMPLERATE=0
593 if test "x${HAVE_LIBSAMPLERATE}" = x1 ; then
594    AC_DEFINE([HAVE_LIBSAMPLERATE], 1, [Have libsamplerate?])
597 AC_SUBST(LIBSAMPLERATE_CFLAGS)
598 AC_SUBST(LIBSAMPLERATE_LIBS)
599 AC_SUBST(HAVE_LIBSAMPLERATE)
600 AM_CONDITIONAL([HAVE_LIBSAMPLERATE], [test "x$HAVE_LIBSAMPLERATE" = x1])
602 #### OSS support (optional) ####
604 AC_ARG_ENABLE([oss],
605     AS_HELP_STRING([--disable-oss],[Disable optional OSS support]),
606         [
607             case "${enableval}" in
608                 yes) oss=yes ;;
609                 no) oss=no ;;
610                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
611             esac
612         ],
613         [oss=auto])
615 if test "x${oss}" != xno ; then
616     AC_CHECK_HEADERS([sys/soundcard.h],
617         [
618             HAVE_OSS=1
619             AC_DEFINE([HAVE_OSS], 1, [Have OSS?])
620         ],
621         [
622             HAVE_OSS=0
623             if test "x$oss" = xyes ; then
624                 AC_MSG_ERROR([*** OSS support not found])
625             fi
626         ])
627 else
628     HAVE_OSS=0
631 AC_SUBST(HAVE_OSS)
632 AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1])
635 #### ALSA support (optional) ####
637 AC_ARG_ENABLE([alsa],
638     AS_HELP_STRING([--disable-alsa],[Disable optional ALSA support]),
639         [
640             case "${enableval}" in
641                 yes) alsa=yes ;;
642                 no) alsa=no ;;
643                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-alsa) ;;
644             esac
645         ],
646         [alsa=auto])
648 if test "x${alsa}" != xno ; then
649     PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.19 ],
650         [
651             HAVE_ALSA=1
652             AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])
653         ],
654         [
655             HAVE_ALSA=0
656             if test "x$alsa" = xyes ; then
657                 AC_MSG_ERROR([*** Needed alsa >= 1.0.19 support not found])
658             fi
659         ])
660 else
661     HAVE_ALSA=0
664 AC_SUBST(ASOUNDLIB_CFLAGS)
665 AC_SUBST(ASOUNDLIB_LIBS)
666 AC_SUBST(HAVE_ALSA)
667 AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1])
669 #### Solaris audio support (optional) ####
671 AC_ARG_ENABLE([solaris],
672     AS_HELP_STRING([--disable-solaris],[Disable optional Solaris audio support]),
673         [
674             case "${enableval}" in
675                 yes) solaris=yes ;;
676                 no) solaris=no ;;
677                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-solaris) ;;
678             esac
679         ],
680         [solaris=auto])
682 if test "x${solaris}" != xno ; then
683     AC_CHECK_HEADERS([sys/audio.h],
684         [
685             HAVE_SOLARIS=1
686             AC_DEFINE([HAVE_SOLARIS], 1, [Have Solaris audio?])
687         ],
688         [
689             HAVE_SOLARIS=0
690             if test "x$solaris" = xyes ; then
691                 AC_MSG_ERROR([*** Solaris audio support not found])
692             fi
693         ])
694 else
695     HAVE_SOLARIS=0
698 AC_SUBST(HAVE_SOLARIS)
699 AM_CONDITIONAL([HAVE_SOLARIS], [test "x$HAVE_SOLARIS" = x1])
701 #### GLib 2 support (optional) ####
703 AC_ARG_ENABLE([glib2],
704     AS_HELP_STRING([--disable-glib2],[Disable optional GLib 2 support]),
705         [
706             case "${enableval}" in
707                 yes) glib2=yes ;;
708                 no) glib2=no ;;
709                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-glib2) ;;
710             esac
711         ],
712         [glib2=auto])
714 if test "x${glib2}" != xno ; then
715     PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ],
716         HAVE_GLIB20=1,
717         [
718             HAVE_GLIB20=0
719             if test "x$glib2" = xyes ; then
720                 AC_MSG_ERROR([*** GLib 2 support not found])
721             fi
722         ])
723 else
724     HAVE_GLIB20=0
727 AC_SUBST(GLIB20_CFLAGS)
728 AC_SUBST(GLIB20_LIBS)
729 AC_SUBST(HAVE_GLIB20)
730 AM_CONDITIONAL([HAVE_GLIB20], [test "x$HAVE_GLIB20" = x1])
732 if test "x$HAVE_GLIB20" = x1 ; then
733    AC_DEFINE([HAVE_GLIB], 1, [Have GLIB?])
736 #### GTK2 support (optional) ####
738 AC_ARG_ENABLE([gtk2],
739     AS_HELP_STRING([--disable-gtk2],[Disable optional Gtk+ 2 support]),
740         [
741             case "${enableval}" in
742                 yes) gtk2=yes ;;
743                 no) gtk2=no ;;
744                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gtk2) ;;
745             esac
746         ],
747         [gtk2=auto])
749 if test "x${gtk2}" != xno ; then
750     PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.4.0 ],
751         HAVE_GTK20=1,
752         [
753             HAVE_GTK20=0
754             if test "x$gtk2" = xyes ; then
755                 AC_MSG_ERROR([*** Gtk+ 2 support not found])
756             fi
757         ])
758 else
759     HAVE_GTK20=0
762 AC_SUBST(GTK20_CFLAGS)
763 AC_SUBST(GTK20_LIBS)
764 AC_SUBST(HAVE_GTK20)
765 AM_CONDITIONAL([HAVE_GTK20], [test "x$HAVE_GTK20" = x1])
767 if test "x$HAVE_GTK20" = x1 ; then
768    AC_DEFINE([HAVE_GTK], 1, [Have GTK?])
771 #### GConf support (optional) ####
773 AC_ARG_ENABLE([gconf],
774     AS_HELP_STRING([--disable-gconf],[Disable optional GConf support]),
775         [
776             case "${enableval}" in
777                 yes) gconf=yes ;;
778                 no) gconf=no ;;
779                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gconf) ;;
780             esac
781         ],
782         [gconf=auto])
784 if test "x${gconf}" != xno ; then
785     PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 ],
786         HAVE_GCONF=1,
787         [
788             HAVE_GCONF=0
789             if test "x$gconf" = xyes ; then
790                 AC_MSG_ERROR([*** GConf support not found])
791             fi
792         ])
793 else
794     HAVE_GCONF=0
797 AC_SUBST(GCONF_CFLAGS)
798 AC_SUBST(GCONF_LIBS)
799 AC_SUBST(HAVE_GCONF)
800 AM_CONDITIONAL([HAVE_GCONF], [test "x$HAVE_GCONF" = x1])
802 #### Avahi support (optional) ####
804 AC_ARG_ENABLE([avahi],
805     AS_HELP_STRING([--disable-avahi],[Disable optional Avahi support]),
806         [
807             case "${enableval}" in
808                 yes) avahi=yes ;;
809                 no) avahi=no ;;
810                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-avahi) ;;
811             esac
812         ],
813         [avahi=auto])
815 if test "x${avahi}" != xno ; then
816     PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.0 ],
817         HAVE_AVAHI=1,
818         [
819                 HAVE_AVAHI=0
820                 if test "x$avahi" = xyes ; then
821                         AC_MSG_ERROR([*** Avahi support not found])
822                 fi
823         ])
824 else
825     HAVE_AVAHI=0
828 AC_SUBST(AVAHI_CFLAGS)
829 AC_SUBST(AVAHI_LIBS)
830 AC_SUBST(HAVE_AVAHI)
831 AM_CONDITIONAL([HAVE_AVAHI], [test "x$HAVE_AVAHI" = x1])
833 ### LIBOIL ####
835 PKG_CHECK_MODULES(LIBOIL, [ liboil-0.3 >= 0.3.0 ])
836 AC_SUBST(LIBOIL_CFLAGS)
837 AC_SUBST(LIBOIL_LIBS)
839 ### JACK (optional) ####
841 AC_ARG_ENABLE([jack],
842     AS_HELP_STRING([--disable-jack],[Disable optional JACK support]),
843         [
844             case "${enableval}" in
845                 yes) jack=yes ;;
846                 no) jack=no ;;
847                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
848             esac
849         ],
850         [jack=auto])
852 if test "x${jack}" != xno ; then
853     PKG_CHECK_MODULES(JACK, [ jack >= 0.100 ],
854         HAVE_JACK=1,
855         [
856             HAVE_JACK=0
857             if test "x$jack" = xyes ; then
858                 AC_MSG_ERROR([*** JACK support not found])
859             fi
860         ])
861 else
862     HAVE_JACK=0
865 AC_SUBST(JACK_CFLAGS)
866 AC_SUBST(JACK_LIBS)
867 AC_SUBST(HAVE_JACK)
868 AM_CONDITIONAL([HAVE_JACK], [test "x$HAVE_JACK" = x1])
870 #### Async DNS support (optional) ####
872 AC_ARG_ENABLE([asyncns],
873     AS_HELP_STRING([--disable-asyncns],[Disable optional Async DNS support]),
874         [
875             case "${enableval}" in
876                 yes) asyncns=yes ;;
877                 no) asyncns=no ;;
878                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-asyncns) ;;
879             esac
880         ],
881         [asyncns=auto])
883 if test "x${asyncns}" != xno ; then
884     PKG_CHECK_MODULES(LIBASYNCNS, [ libasyncns >= 0.1 ],
885         HAVE_LIBASYNCNS=1,
886         [
887             HAVE_LIBASYNCNS=0
888             if test "x$asyncns" = xyes ; then
889                 AC_MSG_ERROR([*** Async DNS support not found])
890             fi
891         ])
892 else
893     HAVE_LIBASYNCNS=0
896 AC_SUBST(LIBASYNCNS_CFLAGS)
897 AC_SUBST(LIBASYNCNS_LIBS)
898 AC_SUBST(HAVE_LIBASYNCNS)
899 AM_CONDITIONAL([HAVE_LIBASYNCNS], [test "x$HAVE_LIBASYNCNS" = x1])
901 if test "x$HAVE_LIBASYNCNS" != "x0" ; then
902    AC_DEFINE([HAVE_LIBASYNCNS], 1, [Have libasyncns?])
905 #### TCP wrappers (optional) ####
907 AC_ARG_ENABLE([tcpwrap],
908     AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
909         [
910             case "${enableval}" in
911                 yes) tcpwrap=yes ;;
912                 no) tcpwrap=no ;;
913                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
914             esac
915         ],
916         [tcpwrap=auto])
918 if test "x${tcpwrap}" != xno ; then
919     ACX_LIBWRAP
920     if test "x${LIBWRAP_LIBS}" = x && test "x$tcpwrap" = xyes ; then
921         AC_MSG_ERROR([*** TCP wrappers support not found])
922     fi
923 else
924     LIBWRAP_LIBS=
927 AC_SUBST(LIBWRAP_LIBS)
929 #### LIRC support (optional) ####
931 AC_ARG_ENABLE([lirc],
932     AS_HELP_STRING([--disable-lirc],[Disable optional LIRC support]),
933         [
934             case "${enableval}" in
935                 yes) lirc=yes ;;
936                 no) lirc=no ;;
937                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-lirc) ;;
938             esac
939         ],
940         [lirc=auto])
942 if test "x${lirc}" != xno ; then
943     ACX_LIRC
944     if test "x${HAVE_LIRC}" = x0 && test "x$lirc" = xyes ; then
945         AC_MSG_ERROR([*** LIRC support not found])
946     fi
947 else
948     HAVE_LIRC=0
951 AC_SUBST(LIRC_CFLAGS)
952 AC_SUBST(LIRC_LIBS)
953 AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1])
955 #### HAL support (optional) ####
957 AC_ARG_ENABLE([hal],
958     AS_HELP_STRING([--disable-hal],[Disable optional HAL support]),
959         [
960             case "${enableval}" in
961                 yes) hal=yes ;;
962                 no) hal=no ;;
963                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal) ;;
964             esac
965         ],
966         [hal=auto])
967 if test "x${hal}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
968     PKG_CHECK_MODULES(HAL, [ hal >= 0.5.11 ],
969         [
970             HAVE_HAL=1
971             AC_DEFINE([HAVE_HAL], 1, [Have HAL.])
972         ],
973         [
974             HAVE_HAL=0
975             if test "x$hal" = xyes ; then
976                 AC_MSG_ERROR([*** HAL support not found])
977             fi
978         ])
979 else
980     HAVE_HAL=0
983 AC_SUBST(HAL_CFLAGS)
984 AC_SUBST(HAL_LIBS)
985 AC_SUBST(HAVE_HAL)
986 AM_CONDITIONAL([HAVE_HAL], [test "x$HAVE_HAL" = x1])
988 #### UDEV support (optional) ####
990 AC_ARG_ENABLE([udev],
991     AS_HELP_STRING([--disable-udev],[Disable optional UDEV support]),
992         [
993             case "${enableval}" in
994                 yes) udev=yes ;;
995                 no) udev=no ;;
996                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-udev) ;;
997             esac
998         ],
999         [udev=auto])
1000 if test "x${udev}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
1001     PKG_CHECK_MODULES(UDEV, [ libudev >= 137 ],
1002         [
1003             HAVE_UDEV=1
1004             AC_DEFINE([HAVE_UDEV], 1, [Have UDEV.])
1005         ],
1006         [
1007             HAVE_UDEV=0
1008             if test "x$udev" = xyes ; then
1009                 AC_MSG_ERROR([*** UDEV support not found])
1010             fi
1011         ])
1012 else
1013     HAVE_UDEV=0
1016 AC_SUBST(UDEV_CFLAGS)
1017 AC_SUBST(UDEV_LIBS)
1018 AC_SUBST(HAVE_UDEV)
1019 AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1])
1021 AC_DEFINE([LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE], 1, [I know the API is subject to change.])
1023 #### BlueZ support (optional) ####
1025 AC_ARG_ENABLE([bluez],
1026     AS_HELP_STRING([--disable-bluez],[Disable optional BlueZ support]),
1027         [
1028             case "${enableval}" in
1029                 yes) bluez=yes ;;
1030                 no) bluez=no ;;
1031                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-bluez) ;;
1032             esac
1033         ],
1034         [bluez=auto])
1035 if test "x${bluez}" != xno ; then
1036     PKG_CHECK_MODULES(BLUEZ, [ bluez >= 3.0 ],
1037         HAVE_BLUEZ=1,
1038         [
1039             HAVE_BLUEZ=0
1040             if test "x$bluez" = xyes ; then
1041                 AC_MSG_ERROR([*** BLUEZ support not found])
1042             fi
1043         ])
1044 else
1045     HAVE_BLUEZ=0
1048 AC_SUBST(BLUEZ_CFLAGS)
1049 AC_SUBST(BLUEZ_LIBS)
1050 AC_SUBST(HAVE_BLUEZ)
1051 AM_CONDITIONAL([HAVE_BLUEZ], [test "x$HAVE_BLUEZ" = x1])
1053 #### D-Bus support (optional) ####
1055 AC_ARG_ENABLE([dbus],
1056     AS_HELP_STRING([--disable-dbus],[Disable optional D-Bus support]),
1057         [
1058             case "${enableval}" in
1059                 yes) dbus=yes ;;
1060                 no) dbus=no ;;
1061                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-dbus) ;;
1062             esac
1063         ],
1064         [dbus=auto])
1066 if test "x$HAVE_HAL" = x1 ; then
1067    dbus=yes
1070 if test "x${dbus}" != xno || test "x${bluez}" != xno || test "x${hal}" != xno ; then
1072     PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.0.0 ],
1073         [
1074             HAVE_DBUS=1
1075             saved_LIBS="$LIBS"
1076             LIBS="$LIBS $DBUS_LIBS"
1077             AC_CHECK_FUNCS(dbus_watch_get_unix_fd)
1078             LIBS="$saved_LIBS"
1079             AC_DEFINE([HAVE_DBUS], 1, [Have D-Bus.])
1080         ],
1081         [
1082             HAVE_DBUS=0
1083             if test "x$dbus" = xyes ; then
1084                 AC_MSG_ERROR([*** D-Bus support not found])
1085             fi
1086         ])
1087 else
1088     HAVE_DBUS=0
1091 AC_SUBST(DBUS_CFLAGS)
1092 AC_SUBST(DBUS_LIBS)
1093 AC_SUBST(HAVE_DBUS)
1094 AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1])
1096 #### PolicyKit support (optional) ####
1098 AC_ARG_ENABLE([polkit],
1099     AS_HELP_STRING([--disable-polkit],[Disable optional PolicyKit support]),
1100         [
1101             case "${enableval}" in
1102                 yes) polkit=yes ;;
1103                 no) polkit=no ;;
1104                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-polkit) ;;
1105             esac
1106         ],
1107         [polkit=auto])
1109 if test "x${polkit}" != xno ; then
1111     PKG_CHECK_MODULES(POLKIT, [ polkit-dbus >= 0.7 ],
1112         [
1113             HAVE_POLKIT=1
1114             AC_DEFINE([HAVE_POLKIT], 1, [Have PolicyKit])
1115             policydir=`pkg-config polkit-dbus --variable prefix`/share/PolicyKit/policy/
1116             AC_SUBST(policydir)
1117         ],
1118         [
1119             HAVE_POLKIT=0
1120             if test "x$polkit" = xyes ; then
1121                 AC_MSG_ERROR([*** PolicyKit support not found])
1122             fi
1123         ])
1124 else
1125     HAVE_POLKIT=0
1128 AC_SUBST(POLKIT_CFLAGS)
1129 AC_SUBST(POLKIT_LIBS)
1130 AC_SUBST(HAVE_POLKIT)
1131 AM_CONDITIONAL([HAVE_POLKIT], [test "x$HAVE_POLKIT" = x1])
1134 ### IPv6 connection support (optional) ###
1136 AC_ARG_ENABLE([ipv6],
1137     AS_HELP_STRING([--disable-ipv6],[Disable optional IPv6 support]),
1138         [
1139             case "${enableval}" in
1140                 yes) ipv6=yes ;;
1141                 no) ipv6=no ;;
1142                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-ipv6) ;;
1143             esac
1144         ],
1145         [ipv6=auto])
1147 if test "x${ipv6}" != xno ; then
1148     AC_DEFINE([HAVE_IPV6], [1], [Define this to enable IPv6 connection support])
1149     HAVE_IPV6=1
1150 else
1151     HAVE_IPV6=0
1154 #### OpenSSL support (optional) ####
1156 AC_ARG_ENABLE([openssl],
1157     AS_HELP_STRING([--disable-openssl],[Disable OpenSSL support (used for Airtunes/RAOP)]),
1158         [
1159             case "${enableval}" in
1160                 yes) openssl=yes ;;
1161                 no) openssl=no ;;
1162                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-openssl) ;;
1163             esac
1164         ],
1165         [openssl=auto])
1167 if test "x${openssl}" != xno ; then
1169     PKG_CHECK_MODULES(OPENSSL, [ openssl > 0.9 ],
1170         [
1171             HAVE_OPENSSL=1
1172             AC_DEFINE([HAVE_OPENSSL], 1, [Have OpenSSL])
1173         ],
1174         [
1175             HAVE_OPENSSL=0
1176             if test "x$openssl" = xyes ; then
1177                 AC_MSG_ERROR([*** OpenSSL support not found])
1178             fi
1179         ])
1180 else
1181     HAVE_OPENSSL=0
1184 AC_SUBST(OPENSSL_CFLAGS)
1185 AC_SUBST(OPENSSL_LIBS)
1186 AC_SUBST(HAVE_OPENSSL)
1187 AM_CONDITIONAL([HAVE_OPENSSL], [test "x$HAVE_OPENSSL" = x1])
1189 ### Build and Install man pages ###
1190 AC_ARG_ENABLE(manpages,
1191         AS_HELP_STRING([--disable-manpages],[Disable building and installation of man pages]),
1192 [case "${enableval}" in
1193   yes) manpages=yes ;;
1194   no)  manpages=no ;;
1195   *) AC_MSG_ERROR([bad value ${enableval} for --disable-manpages]) ;;
1196 esac],[manpages=yes])
1198 AM_CONDITIONAL([BUILD_MANPAGES], [test "x$manpages" = xyes])
1200 #### PulseAudio system group & user  #####
1202 AC_ARG_WITH(system_user, AS_HELP_STRING([--with-system-user=<user>],[User for running the PulseAudio daemon as a system-wide instance (pulse)]))
1203 if test -z "$with_system_user" ; then
1204     PA_SYSTEM_USER=pulse
1205 else
1206     PA_SYSTEM_USER=$with_system_user
1208 AC_SUBST(PA_SYSTEM_USER)
1209 AC_DEFINE_UNQUOTED(PA_SYSTEM_USER,"$PA_SYSTEM_USER", [User for running the PulseAudio system daemon])
1211 AC_ARG_WITH(system_group,AS_HELP_STRING([--with-system-group=<group>],[Group for running the PulseAudio daemon as a system-wide instance (pulse)]))
1212 if test -z "$with_system_group" ; then
1213     PA_SYSTEM_GROUP=pulse
1214 else
1215     PA_SYSTEM_GROUP=$with_system_group
1217 AC_SUBST(PA_SYSTEM_GROUP)
1218 AC_DEFINE_UNQUOTED(PA_SYSTEM_GROUP,"$PA_SYSTEM_GROUP", [Group for the PulseAudio system daemon])
1220 AC_ARG_WITH(realtime_group,AS_HELP_STRING([--with-realtime-group=<group>],[Group for users that are allowed to start the PulseAudio daemon with realtime scheduling (realtime)]))
1221 if test -z "$with_realtime_group" ; then
1222     PA_REALTIME_GROUP=pulse-rt
1223 else
1224     PA_REALTIME_GROUP=$with_realtime_group
1226 AC_SUBST(PA_REALTIME_GROUP)
1227 AC_DEFINE_UNQUOTED(PA_REALTIME_GROUP,"$PA_REALTIME_GROUP", [Realtime group])
1229 AC_ARG_WITH(access_group,AS_HELP_STRING([--with-access-group=<group>],[Group which is allowed access to a system-wide PulseAudio daemon (pulse-access)]))
1230 if test -z "$with_access_group" ; then
1231     PA_ACCESS_GROUP=pulse-access
1232 else
1233     PA_ACCESS_GROUP=$with_access_group
1235 AC_SUBST(PA_ACCESS_GROUP)
1236 AC_DEFINE_UNQUOTED(PA_ACCESS_GROUP,"$PA_ACCESS_GROUP", [Access group])
1238 AC_ARG_ENABLE(
1239         per_user_esound_socket,
1240         AS_HELP_STRING([--disable-per-user-esound-socket], [Use global esound socket directory /tmp/.esd/socket.]),
1241         [
1242             case "${enableval}" in
1243                 yes) per_user_esound_socket=1 ;;
1244                 no) per_user_esound_socket=0 ;;
1245                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-per-user-esound-socket) ;;
1246             esac
1247         ],
1248         [per_user_esound_socket=1])
1250 if test "x$per_user_esound_socket" = "x1"; then
1251    AC_DEFINE([USE_PER_USER_ESOUND_SOCKET], [1], [Define this if you want per-user esound socket directories])
1254 #### PulseAudio system runtime dir ####
1255 PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
1256 AC_SUBST(PA_SYSTEM_RUNTIME_PATH)
1257 PA_SYSTEM_CONFIG_PATH="${localstatedir}/lib/pulse"
1258 AC_SUBST(PA_SYSTEM_CONFIG_PATH)
1259 PA_SYSTEM_STATE_PATH="${localstatedir}/lib/pulse"
1260 AC_SUBST(PA_SYSTEM_STATE_PATH)
1262 ###################################
1263 #            Output               #
1264 ###################################
1266 AC_ARG_ENABLE([legacy-runtime-dir],
1267         AS_HELP_STRING([--disable-legacy-runtime-dir], [Try to connect on legacy (< 0.9.12) socket paths.]))
1268 if test "x$enable_legacy_runtime_dir" != "xno" ; then
1269         AC_DEFINE(ENABLE_LEGACY_RUNTIME_DIR, [1], [Legacy runtime dir])
1272 AC_ARG_ENABLE(
1273         [static-bins],
1274         AS_HELP_STRING([--enable-static-bins],[Statically link executables.]),
1275         [STATIC_BINS=1], [STATIC_BINS=0])
1276 AM_CONDITIONAL([STATIC_BINS], [test "x$STATIC_BINS" = "x1"])
1278 AC_ARG_WITH(
1279         [preopen-mods],
1280         AS_HELP_STRING([--with-preopen-mods],[Modules to preopen in daemon (default: all).]),
1281         [PREOPEN_MODS=$withval], [PREOPEN_MODS="all"])
1282 AM_CONDITIONAL([PREOPEN_MODS], [test "x$PREOPEN_MODS" != "xall"])
1283 if test "x$PREOPEN_MODS" != "xall" ; then
1284     tmpLIBS=""
1285     for mod in $PREOPEN_MODS; do
1286         tmpLIBS="$tmpLIBS module-$mod.la"
1287     done
1288     PREOPEN_MODS="$tmpLIBS"
1289     AC_SUBST(PREOPEN_MODS)
1292 AC_ARG_WITH(
1293         [module-dir],
1294         AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINORMICRO}/modules/]),
1295         [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINORMICRO}/modules/"])
1297 AC_SUBST(modlibexecdir)
1299 AC_ARG_ENABLE(
1300         [force-preopen],
1301         AS_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),
1302         [FORCE_PREOPEN=$enableval], [FORCE_PREOPEN=no])
1303 AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "xyes"])
1305 AC_CONFIG_FILES([
1306 Makefile
1307 shave
1308 shave-libtool
1309 src/Makefile
1310 man/Makefile
1311 libpulse.pc
1312 libpulse-simple.pc
1313 libpulse-browse.pc
1314 libpulse-mainloop-glib.pc
1315 doxygen/Makefile
1316 doxygen/doxygen.conf
1317 src/pulse/version.h
1318 po/Makefile.in
1321 SHAVE_INIT
1322 AC_OUTPUT
1323 SHAVE_OUTPUT
1325 # ==========================================================================
1326 ENABLE_X11=no
1327 if test "x$HAVE_X11" = "x1" ; then
1328    ENABLE_X11=yes
1331 ENABLE_OSS=no
1332 if test "x$HAVE_OSS" = "x1" ; then
1333    ENABLE_OSS=yes
1336 ENABLE_ALSA=no
1337 if test "x$HAVE_ALSA" = "x1" ; then
1338    ENABLE_ALSA=yes
1341 ENABLE_SOLARIS=no
1342 if test "x$HAVE_SOLARIS" = "x1" ; then
1343    ENABLE_SOLARIS=yes
1346 ENABLE_GTK20=no
1347 if test "x$HAVE_GTK20" = "x1" ; then
1348    ENABLE_GTK20=yes
1351 ENABLE_GLIB20=no
1352 if test "x$HAVE_GLIB20" = "x1" ; then
1353    ENABLE_GLIB20=yes
1356 ENABLE_GCONF=no
1357 if test "x$HAVE_GCONF" = "x1" ; then
1358    ENABLE_GCONF=yes
1361 ENABLE_AVAHI=no
1362 if test "x$HAVE_AVAHI" = "x1" ; then
1363    ENABLE_AVAHI=yes
1366 ENABLE_JACK=no
1367 if test "x$HAVE_JACK" = "x1" ; then
1368    ENABLE_JACK=yes
1371 ENABLE_LIBASYNCNS=no
1372 if test "x$HAVE_LIBASYNCNS" = "x1" ; then
1373    ENABLE_LIBASYNCNS=yes
1376 ENABLE_LIRC=no
1377 if test "x$HAVE_LIRC" = "x1" ; then
1378    ENABLE_LIRC=yes
1381 ENABLE_HAL=no
1382 if test "x$HAVE_HAL" = "x1" ; then
1383    ENABLE_HAL=yes
1386 ENABLE_UDEV=no
1387 if test "x$HAVE_UDEV" = "x1" ; then
1388    ENABLE_UDEV=yes
1391 ENABLE_TCPWRAP=no
1392 if test "x${LIBWRAP_LIBS}" != x ; then
1393    ENABLE_TCPWRAP=yes
1396 ENABLE_LIBSAMPLERATE=no
1397 if test "x${HAVE_LIBSAMPLERATE}" = "x1" ; then
1398    ENABLE_LIBSAMPLERATE=yes
1401 ENABLE_BLUEZ=no
1402 if test "x${HAVE_BLUEZ}" = "x1" ; then
1403    ENABLE_BLUEZ=yes
1406 ENABLE_POLKIT=no
1407 if test "x${HAVE_POLKIT}" = "x1" ; then
1408    ENABLE_POLKIT=yes
1411 ENABLE_OPENSSL=no
1412 if test "x${HAVE_OPENSSL}" = "x1" ; then
1413    ENABLE_OPENSSL=yes
1416 ENABLE_IPV6=no
1417 if test "x${HAVE_IPV6}" = "x1" ; then
1418    ENABLE_IPV6=yes
1421 ENABLE_PER_USER_ESOUND_SOCKET=no
1422 if test "x$per_user_esound_socket" = "x1" ; then
1423    ENABLE_PER_USER_ESOUND_SOCKET=yes
1426 echo "
1427  ---{ $PACKAGE_NAME $VERSION }---
1429     prefix:                        ${prefix}
1430     sysconfdir:                    ${sysconfdir}
1431     localstatedir:                 ${localstatedir}
1432     System Runtime Path:           ${PA_SYSTEM_RUNTIME_PATH}
1433     System State Path:             ${PA_SYSTEM_STATE_PATH}
1434     System Config Path:            ${PA_SYSTEM_CONFIG_PATH}
1435     Compiler:                      ${CC}
1436     CFLAGS:                        ${CFLAGS}
1438     Have X11:                      ${ENABLE_X11}
1439     Enable OSS:                    ${ENABLE_OSS}
1440     Enable Alsa:                   ${ENABLE_ALSA}
1441     Enable Solaris:                ${ENABLE_SOLARIS}
1442     Enable GLib 2.0:               ${ENABLE_GLIB20}
1443     Enable Gtk+ 2.0:               ${ENABLE_GTK20}
1444     Enable GConf:                  ${ENABLE_GCONF}
1445     Enable Avahi:                  ${ENABLE_AVAHI}
1446     Enable Jack:                   ${ENABLE_JACK}
1447     Enable Async DNS:              ${ENABLE_LIBASYNCNS}
1448     Enable LIRC:                   ${ENABLE_LIRC}
1449     Enable HAL:                    ${ENABLE_HAL}
1450     Enable udev:                   ${ENABLE_UDEV}
1451     Enable BlueZ:                  ${ENABLE_BLUEZ}
1452     Enable TCP Wrappers:           ${ENABLE_TCPWRAP}
1453     Enable libsamplerate:          ${ENABLE_LIBSAMPLERATE}
1454     Enable PolicyKit:              ${ENABLE_POLKIT}
1455     Enable IPv6:                   ${ENABLE_IPV6}
1456     Enable OpenSSL (for Airtunes): ${ENABLE_OPENSSL}
1458     System User:                   ${PA_SYSTEM_USER}
1459     System Group:                  ${PA_SYSTEM_GROUP}
1460     Realtime Group:                ${PA_REALTIME_GROUP}
1461     Access Group:                  ${PA_ACCESS_GROUP}
1462     Enable per-user EsounD socket: ${ENABLE_PER_USER_ESOUND_SOCKET}
1463     Force preopen:                 ${FORCE_PREOPEN}
1464     Preopened modules:             ${PREOPEN_MODS}