]> code.delx.au - pulseaudio/blob - configure.ac
Handle when ALSA tweaks our sample spec so much that the frame size changes.
[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 PulseAudio.
7 #
8 # Copyright 2004-2006 Lennart Poettering
9 # Copyright 2006-2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
10 #
11 # PulseAudio is free software; you can redistribute it and/or modify it
12 # under the terms of the GNU Lesser General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
15 #
16 # PulseAudio is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 # General Public License for more details.
20 #
21 # You should have received a copy of the GNU Lesser General Public License
22 # along with PulseAudio; if not, write to the Free Software Foundation,
23 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
24
25 AC_PREREQ(2.57)
26
27 m4_define(PA_MAJOR, [0])
28 m4_define(PA_MINOR, [9])
29 m4_define(PA_MICRO, [5])
30
31 AC_INIT([pulseaudio], PA_MAJOR.PA_MINOR.PA_MICRO,[mzcbylcnhqvb (at) 0pointer (dot) de])
32 AC_CONFIG_SRCDIR([src/daemon/main.c])
33 AC_CONFIG_HEADERS([config.h])
34 AM_INIT_AUTOMAKE([foreign -Wall])
35
36 AC_SUBST(PA_MAJORMINOR, "PA_MAJOR.PA_MINOR")
37 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/pulseaudio/])
38
39 AC_SUBST(PA_API_VERSION, 10)
40 AC_SUBST(PA_PROTOCOL_VERSION, 10)
41
42 AC_SUBST(LIBPULSE_VERSION_INFO, [1:0:1])
43 AC_SUBST(LIBPULSECORE_VERSION_INFO, [2:0:0])
44 AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:0:0])
45 AC_SUBST(LIBPULSE_BROWSE_VERSION_INFO, [1:0:1])
46 AC_SUBST(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO, [0:2:0])
47
48 AC_CANONICAL_HOST
49
50 if type -p stow > /dev/null && test -d /usr/local/stow ; then
51 AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
52 ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
53 fi
54
55 #### Platform hacks ####
56
57 case $host in
58 *-*-solaris* )
59 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
60 AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris)
61 AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
62 ;;
63 esac
64
65 #### Checks for programs. ####
66
67 # CC
68
69 AC_PROG_CC
70 AC_PROG_GCC_TRADITIONAL
71 AC_GNU_SOURCE
72
73 # M4
74
75 AC_PATH_PROG([M4], [m4 gm4], [no])
76 if test "x$M4" = xno ; then
77 AC_MSG_ERROR([m4 missing])
78 fi
79
80 # GCC flags
81
82 test_gcc_flag() {
83 AC_LANG_CONFTEST([int main() {}])
84 $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
85 ret=$?
86 rm -f conftest.o
87 return $ret
88 }
89
90 # If using GCC specify some additional parameters
91 if test "x$GCC" = "xyes" ; then
92
93 # We use gnu99 instead of c99 because many have interpreted the standard
94 # in a way that int64_t isn't defined on non-64 bit platforms.
95 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"
96
97 for flag in $DESIRED_FLAGS ; do
98 AC_MSG_CHECKING([whether $CC accepts $flag])
99 if test_gcc_flag $flag ; then
100 CFLAGS="$CFLAGS $flag"
101 AC_MSG_RESULT([yes])
102 else
103 AC_MSG_RESULT([no])
104 fi
105 done
106 fi
107
108 #### libtool stuff ####
109
110 AC_LTDL_ENABLE_INSTALL
111 AC_LIBLTDL_INSTALLABLE
112 AC_SUBST(LTDLINCL)
113 AC_SUBST(LIBLTDL)
114 AC_LIBTOOL_DLOPEN
115 AC_LIBTOOL_WIN32_DLL
116 AC_PROG_LIBTOOL
117 AC_CONFIG_SUBDIRS(libltdl)
118
119 if test "x$enable_ltdl_install" = "xno" && test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then
120 AC_MSG_ERROR([[
121
122 *** Cannot find the libltdl development files.
123 *** Maybe you need to install the libltdl-dev package.
124 ]])
125 fi
126
127 #### Determine build environment ####
128
129 os_is_win32=0
130
131 case "$host_os" in
132 mingw*)
133 AC_DEFINE([OS_IS_WIN32], 1, [Build target is Windows.])
134 os_is_win32=1
135 ;;
136 esac
137
138 AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1")
139
140 ###################################
141 # Basic environment checks #
142 ###################################
143
144 #### Checks for header files. ####
145
146 # ISO
147 AC_HEADER_STDC
148
149 # POSIX
150 AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
151 netinet/in_systm.h netinet/tcp.h pwd.h sched.h \
152 sys/mman.h sys/resource.h sys/select.h sys/socket.h sys/wait.h \
153 syslog.h])
154 AC_CHECK_HEADERS([netinet/ip.h], [], [],
155 [#include <sys/types.h>
156 #if HAVE_NETINET_IN_H
157 # include <netinet/in.h>
158 #endif
159 #if HAVE_NETINET_IN_SYSTM_H
160 # include <netinet/in_systm.h>
161 #endif
162 ])
163 AC_CHECK_HEADERS([regex.h], [HAVE_REGEX=1], [HAVE_REGEX=0])
164 AC_CHECK_HEADERS([sys/un.h], [HAVE_AF_UNIX=1], [HAVE_AF_UNIX=0])
165
166 AM_CONDITIONAL(HAVE_REGEX, test "x$HAVE_REGEX" = "x1")
167 AM_CONDITIONAL(HAVE_AF_UNIX, test "x$HAVE_AF_UNIX" = "x1")
168
169 # XPG4-UNIX
170 AC_CHECK_HEADERS([sys/poll.h])
171
172 # Linux
173 AC_CHECK_HEADERS([linux/input.h], [HAVE_EVDEV=1], [HAVE_EVDEV=0])
174
175 AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = "x1"])
176
177 AC_CHECK_HEADERS([sys/prctl.h])
178
179 # Solaris
180 AC_CHECK_HEADERS([sys/filio.h])
181
182 # Windows
183 AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
184
185 # Other
186 AC_CHECK_HEADERS([sys/ioctl.h])
187
188 #### Typdefs, structures, etc. ####
189
190 AC_C_CONST
191 AC_C_BIGENDIAN
192 AC_TYPE_PID_T
193 AC_TYPE_SIZE_T
194 AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
195 [Define ssize_t if it is not done by the standard libs.])])
196 AC_TYPE_OFF_T
197 AC_TYPE_SIGNAL
198 AC_TYPE_UID_T
199
200 AC_CHECK_DEFINE([SIGXCPU], [signal.h], [
201 HAVE_SIGXCPU=1
202 AC_DEFINE([HAVE_SIGXCPU], 1, [Have SIGXCPU?])
203 ], [HAVE_SIGXCPU=0])
204 AM_CONDITIONAL(HAVE_SIGXCPU, test "x$HAVE_SIGXCPU" = "x1")
205
206 # Solaris lacks this
207 AC_CHECK_DEFINE([INADDR_NONE], [netinet/in.h], [],
208 [AC_CHECK_DEFINE([INADDR_NONE], [winsock2.h], [],
209 [AC_DEFINE([INADDR_NONE], [0xffffffff], [Define INADDR_NONE if not found in <netinet/in.h>])])])
210
211 #### Check for libs ####
212
213 # ISO
214 AC_SEARCH_LIBS([pow], [m])
215
216 # POSIX
217 AC_SEARCH_LIBS([sched_setscheduler], [rt])
218 AC_SEARCH_LIBS([dlopen], [dl])
219 AC_SEARCH_LIBS([shm_open], [rt])
220
221 # BSD
222 AC_SEARCH_LIBS([connect], [socket])
223
224 # Non-standard
225
226 # This magic is needed so we do not needlessly add static libs to the win32
227 # build, disabling its ability to make dlls.
228 AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])])
229
230 #### Check for functions ####
231
232 # POSIX
233 AC_FUNC_FORK
234 AC_FUNC_GETGROUPS
235 AC_FUNC_SELECT_ARGTYPES
236 AC_CHECK_FUNCS([chmod chown getaddrinfo getgrgid_r getpwuid_r gettimeofday \
237 getuid inet_ntop inet_pton nanosleep pipe posix_memalign setpgid setsid \
238 shm_open sigaction sleep sysconf])
239 AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
240
241 AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
242
243 # X/OPEN
244 AC_CHECK_FUNCS([readlink])
245
246 # SUSv2
247 AC_CHECK_FUNCS([ctime_r usleep])
248
249 # SUSv3
250 AC_CHECK_FUNCS([strerror_r])
251
252 # BSD
253 AC_CHECK_FUNCS([lstat])
254
255 # Non-standard
256
257 AC_CHECK_FUNCS([setresuid setresgid setreuid setregid seteuid setegid])
258
259 #### POSIX threads ####
260
261 ACX_PTHREAD
262
263 #### Large File-Support (LFS) ####
264
265 AC_SYS_LARGEFILE
266
267 # Check for open64 to know if the current system does have open64() and similar functions
268 AC_CHECK_FUNCS([open64])
269
270 #### [lib]iconv ####
271
272 AM_ICONV
273
274 ###################################
275 # External libraries #
276 ###################################
277
278 #### X11 (optional) ####
279
280 HAVE_X11=0
281
282 # The macro tests the host, not the build target
283 if test "x$os_is_win32" != "x1" ; then
284 AC_PATH_XTRA
285 test "x$no_x" != "xyes" && HAVE_X11=1
286 fi
287
288 AC_SUBST(HAVE_X11)
289 AM_CONDITIONAL(HAVE_X11, test "x$HAVE_X11" = "x1")
290 if test "x$HAVE_X11" = "x1" ; then
291 AC_DEFINE([HAVE_X11], 1, [Have X11])
292 fi
293
294 #### Capabilities (optional) ####
295
296 CAP_LIBS=''
297
298 AC_ARG_WITH(
299 [caps],
300 AC_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.]))
301
302 if test "x${with_caps}" != "xno"; then
303 AC_SEARCH_LIBS([cap_init], [cap], [], [
304 if test "x${with_caps}" = "xyes" ; then
305 AC_MSG_ERROR([*** POSIX caps libraries not found])
306 fi])
307 AC_CHECK_HEADERS([sys/capability.h], [], [
308 if test "x${with_caps}" = "xyes" ; then
309 AC_MSG_ERROR([*** POSIX caps headers not found])
310 fi])
311 fi
312
313 #### pkg-config ####
314
315 # Check for pkg-config manually first, as if its not installed the
316 # PKG_PROG_PKG_CONFIG macro won't be defined.
317 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
318
319 if test x"$have_pkg_config" = "xno"; then
320 AC_MSG_ERROR(pkg-config is required to install this program)
321 fi
322
323 PKG_PROG_PKG_CONFIG
324
325 #### Sample rate conversion ####
326
327 PKG_CHECK_MODULES(LIBSAMPLERATE, [ samplerate >= 0.1.0 ])
328 AC_SUBST(LIBSAMPLERATE_CFLAGS)
329 AC_SUBST(LIBSAMPLERATE_LIBS)
330
331 #### Sound file ####
332
333 PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
334 AC_SUBST(LIBSNDFILE_CFLAGS)
335 AC_SUBST(LIBSNDFILE_LIBS)
336
337 #### atomic-ops ###
338
339 AC_CHECK_HEADERS([atomic_ops.h], [], [
340 AC_MSG_ERROR([*** libatomic-ops headers not found])
341 ])
342
343 # Win32 does not need the lib and breaks horribly if we try to include it
344 if test "x$os_is_win32" != "x1" ; then
345 LIBS="$LIBS -latomic_ops"
346 fi
347
348 #### OSS support (optional) ####
349
350 AC_ARG_ENABLE([oss],
351 AC_HELP_STRING([--disable-oss], [Disable optional OSS support]),
352 [
353 case "${enableval}" in
354 yes) oss=yes ;;
355 no) oss=no ;;
356 *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
357 esac
358 ],
359 [oss=auto])
360
361 if test "x${oss}" != xno ; then
362 AC_CHECK_HEADERS([sys/soundcard.h],
363 [
364 HAVE_OSS=1
365 AC_DEFINE([HAVE_OSS], 1, [Have OSS?])
366 ],
367 [
368 HAVE_OSS=0
369 if test "x$oss" = xyes ; then
370 AC_MSG_ERROR([*** OSS support not found])
371 fi
372 ])
373 else
374 HAVE_OSS=0
375 fi
376
377 AC_SUBST(HAVE_OSS)
378 AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1])
379
380
381 #### ALSA support (optional) ####
382
383 AC_ARG_ENABLE([alsa],
384 AC_HELP_STRING([--disable-alsa], [Disable optional ALSA support]),
385 [
386 case "${enableval}" in
387 yes) alsa=yes ;;
388 no) alsa=no ;;
389 *) AC_MSG_ERROR(bad value ${enableval} for --disable-alsa) ;;
390 esac
391 ],
392 [alsa=auto])
393
394 if test "x${alsa}" != xno ; then
395 PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ],
396 [
397 HAVE_ALSA=1
398 AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])
399 ],
400 [
401 HAVE_ALSA=0
402 if test "x$alsa" = xyes ; then
403 AC_MSG_ERROR([*** ALSA support not found])
404 fi
405 ])
406 else
407 HAVE_ALSA=0
408 fi
409
410 AC_SUBST(ASOUNDLIB_CFLAGS)
411 AC_SUBST(ASOUNDLIB_LIBS)
412 AC_SUBST(HAVE_ALSA)
413 AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1])
414
415 #### Solaris audio support (optional) ####
416
417 AC_ARG_ENABLE([solaris],
418 AC_HELP_STRING([--disable-solaris], [Disable optional Solaris audio support]),
419 [
420 case "${enableval}" in
421 yes) solaris=yes ;;
422 no) solaris=no ;;
423 *) AC_MSG_ERROR(bad value ${enableval} for --disable-solaris) ;;
424 esac
425 ],
426 [solaris=auto])
427
428 if test "x${solaris}" != xno ; then
429 AC_CHECK_HEADERS([sys/audio.h],
430 [
431 HAVE_SOLARIS=1
432 AC_DEFINE([HAVE_SOLARIS], 1, [Have Solaris audio?])
433 ],
434 [
435 HAVE_SOLARIS=0
436 if test "x$solaris" = xyes ; then
437 AC_MSG_ERROR([*** Solaris audio support not found])
438 fi
439 ])
440 else
441 HAVE_SOLARIS=0
442 fi
443
444 AC_SUBST(HAVE_SOLARIS)
445 AM_CONDITIONAL([HAVE_SOLARIS], [test "x$HAVE_SOLARIS" = x1])
446
447 #### GLib 2 support (optional) ####
448
449 AC_ARG_ENABLE([glib2],
450 AC_HELP_STRING([--disable-glib2], [Disable optional GLib 2 support]),
451 [
452 case "${enableval}" in
453 yes) glib2=yes ;;
454 no) glib2=no ;;
455 *) AC_MSG_ERROR(bad value ${enableval} for --disable-glib2) ;;
456 esac
457 ],
458 [glib2=auto])
459
460 if test "x${glib2}" != xno ; then
461 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ],
462 HAVE_GLIB20=1,
463 [
464 HAVE_GLIB20=0
465 if test "x$glib2" = xyes ; then
466 AC_MSG_ERROR([*** GLib 2 support not found])
467 fi
468 ])
469 else
470 HAVE_GLIB20=0
471 fi
472
473 AC_SUBST(GLIB20_CFLAGS)
474 AC_SUBST(GLIB20_LIBS)
475 AC_SUBST(HAVE_GLIB20)
476 AM_CONDITIONAL([HAVE_GLIB20], [test "x$HAVE_GLIB20" = x1])
477
478 #### GConf support (optional) ####
479
480 AC_ARG_ENABLE([gconf],
481 AC_HELP_STRING([--disable-gconf], [Disable optional GConf support]),
482 [
483 case "${enableval}" in
484 yes) gconf=yes ;;
485 no) gconf=no ;;
486 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gconf) ;;
487 esac
488 ],
489 [glib=auto])
490
491 if test "x${gconf}" != xno ; then
492 PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 ],
493 HAVE_GCONF=1,
494 [
495 HAVE_GCONF=0
496 if test "x$gconf" = xyes ; then
497 AC_MSG_ERROR([*** GConf support not found])
498 fi
499 ])
500 else
501 HAVE_GCONF=0
502 fi
503
504 AC_SUBST(GCONF_CFLAGS)
505 AC_SUBST(GCONF_LIBS)
506 AC_SUBST(HAVE_GCONF)
507 AM_CONDITIONAL([HAVE_GCONF], [test "x$HAVE_GCONF" = x1])
508
509 #### Avahi support (optional) ####
510
511 AC_ARG_ENABLE([avahi],
512 AC_HELP_STRING([--disable-avahi], [Disable optional Avahi support]),
513 [
514 case "${enableval}" in
515 yes) avahi=yes ;;
516 no) avahi=no ;;
517 *) AC_MSG_ERROR(bad value ${enableval} for --disable-avahi) ;;
518 esac
519 ],
520 [avahi=auto])
521
522 if test "x${avahi}" != xno ; then
523 PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.0 ],
524 HAVE_AVAHI=1,
525 [
526 HAVE_AVAHI=0
527 if test "x$avahi" = xyes ; then
528 AC_MSG_ERROR([*** Avahi support not found])
529 fi
530 ])
531 else
532 HAVE_AVAHI=0
533 fi
534
535 AC_SUBST(AVAHI_CFLAGS)
536 AC_SUBST(AVAHI_LIBS)
537 AC_SUBST(HAVE_AVAHI)
538 AM_CONDITIONAL([HAVE_AVAHI], [test "x$HAVE_AVAHI" = x1])
539
540 ### LIBOIL ####
541
542 PKG_CHECK_MODULES(LIBOIL, [ liboil-0.3 >= 0.3.0 ])
543 AC_SUBST(LIBOIL_CFLAGS)
544 AC_SUBST(LIBOIL_LIBS)
545
546 ### JACK (optional) ####
547
548 AC_ARG_ENABLE([jack],
549 AC_HELP_STRING([--disable-jack], [Disable optional JACK support]),
550 [
551 case "${enableval}" in
552 yes) jack=yes ;;
553 no) jack=no ;;
554 *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
555 esac
556 ],
557 [jack=auto])
558
559 if test "x${jack}" != xno ; then
560 PKG_CHECK_MODULES(JACK, [ jack >= 0.100 ],
561 HAVE_JACK=1,
562 [
563 HAVE_JACK=0
564 if test "x$jack" = xyes ; then
565 AC_MSG_ERROR([*** JACK support not found])
566 fi
567 ])
568 else
569 HAVE_JACK=0
570 fi
571
572 AC_SUBST(JACK_CFLAGS)
573 AC_SUBST(JACK_LIBS)
574 AC_SUBST(HAVE_JACK)
575 AM_CONDITIONAL([HAVE_JACK], [test "x$HAVE_JACK" = x1])
576
577 #### Async DNS support (optional) ####
578
579 AC_ARG_ENABLE([asyncns],
580 AC_HELP_STRING([--disable-asyncns], [Disable optional Async DNS support]),
581 [
582 case "${enableval}" in
583 yes) asyncns=yes ;;
584 no) asyncns=no ;;
585 *) AC_MSG_ERROR(bad value ${enableval} for --disable-asyncns) ;;
586 esac
587 ],
588 [asyncns=auto])
589
590 if test "x${asyncns}" != xno ; then
591 PKG_CHECK_MODULES(LIBASYNCNS, [ libasyncns >= 0.1 ],
592 HAVE_LIBASYNCNS=1,
593 [
594 HAVE_LIBASYNCNS=0
595 if test "x$asyncns" = xyes ; then
596 AC_MSG_ERROR([*** Async DNS support not found])
597 fi
598 ])
599 else
600 HAVE_LIBASYNCNS=0
601 fi
602
603 AC_SUBST(LIBASYNCNS_CFLAGS)
604 AC_SUBST(LIBASYNCNS_LIBS)
605 AC_SUBST(HAVE_LIBASYNCNS)
606 AM_CONDITIONAL([HAVE_LIBASYNCNS], [test "x$HAVE_LIBASYNCNS" = x1])
607
608 if test "x$HAVE_LIBASYNCNS" != "x0" ; then
609 AC_DEFINE([HAVE_LIBASYNCNS], 1, [Have libasyncns?])
610 fi
611
612 #### TCP wrappers (optional) ####
613
614 AC_ARG_ENABLE([tcpwrap],
615 AC_HELP_STRING([--disable-tcpwrap], [Disable optional TCP wrappers support]),
616 [
617 case "${enableval}" in
618 yes) tcpwrap=yes ;;
619 no) tcpwrap=no ;;
620 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
621 esac
622 ],
623 [tcpwrap=auto])
624
625 if test "x${tcpwrap}" != xno ; then
626 ACX_LIBWRAP
627 if test "x${LIBWRAP_LIBS}" = x && test "x$tcpwrap" = xyes ; then
628 AC_MSG_ERROR([*** TCP wrappers support not found])
629 fi
630 else
631 LIBWRAP_LIBS=
632 fi
633
634 AC_SUBST(LIBWRAP_LIBS)
635
636 #### LIRC support (optional) ####
637
638 AC_ARG_ENABLE([lirc],
639 AC_HELP_STRING([--disable-lirc], [Disable optional LIRC support]),
640 [
641 case "${enableval}" in
642 yes) lirc=yes ;;
643 no) lirc=no ;;
644 *) AC_MSG_ERROR(bad value ${enableval} for --disable-lirc) ;;
645 esac
646 ],
647 [lirc=auto])
648
649 if test "x${lirc}" != xno ; then
650 ACX_LIRC
651 if test "x${HAVE_LIRC}" = x0 && test "x$lirc" = xyes ; then
652 AC_MSG_ERROR([*** LIRC support not found])
653 fi
654 else
655 HAVE_LIRC=0
656 fi
657
658 AC_SUBST(LIRC_CFLAGS)
659 AC_SUBST(LIRC_LIBS)
660 AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1])
661
662 #### HAL support (optional) ####
663
664 AC_ARG_ENABLE([hal],
665 AC_HELP_STRING([--disable-hal], [Disable optional HAL support]),
666 [
667 case "${enableval}" in
668 yes) hal=yes ;;
669 no) hal=no ;;
670 *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal) ;;
671 esac
672 ],
673 [hal=auto])
674
675 if test "x${hal}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
676 PKG_CHECK_MODULES(HAL, [ hal >= 0.5.7 ],
677 HAVE_HAL=1,
678 [
679 HAVE_HAL=0
680 if test "x$hal" = xyes ; then
681 AC_MSG_ERROR([*** HAL support not found])
682 fi
683 ])
684 else
685 HAVE_HAL=0
686 fi
687
688 AC_SUBST(HAL_CFLAGS)
689 AC_SUBST(HAL_LIBS)
690 AC_SUBST(HAVE_HAL)
691 AM_CONDITIONAL([HAVE_HAL], [test "x$HAVE_HAL" = x1])
692
693 #### PulseAudio system group & user #####
694
695 AC_ARG_WITH(system_user, AS_HELP_STRING([--with-system-user=<user>],[User for running the PulseAudio daemon as a system-wide instance (pulse)]))
696 if test -z "$with_system_user" ; then
697 PA_SYSTEM_USER=pulse
698 else
699 PA_SYSTEM_USER=$with_system_user
700 fi
701 AC_SUBST(PA_SYSTEM_USER)
702 AC_DEFINE_UNQUOTED(PA_SYSTEM_USER,"$PA_SYSTEM_USER", [User for running the PulseAudio system daemon])
703
704 AC_ARG_WITH(system_group,AS_HELP_STRING([--with-system-group=<group>],[Group for running the PulseAudio daemon as a system-wide instance (pulse)]))
705 if test -z "$with_system_group" ; then
706 PA_SYSTEM_GROUP=pulse
707 else
708 PA_SYSTEM_GROUP=$with_system_group
709 fi
710 AC_SUBST(PA_SYSTEM_GROUP)
711 AC_DEFINE_UNQUOTED(PA_SYSTEM_GROUP,"$PA_SYSTEM_GROUP", [Group for the PulseAudio system daemon])
712
713 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)]))
714 if test -z "$with_realtime_group" ; then
715 PA_REALTIME_GROUP=pulse-rt
716 else
717 PA_REALTIME_GROUP=$with_realtime_group
718 fi
719 AC_SUBST(PA_REALTIME_GROUP)
720 AC_DEFINE_UNQUOTED(PA_REALTIME_GROUP,"$PA_REALTIME_GROUP", [Realtime group])
721
722 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)]))
723 if test -z "$with_access_group" ; then
724 PA_ACCESS_GROUP=pulse-access
725 else
726 PA_ACCESS_GROUP=$with_access_group
727 fi
728 AC_SUBST(PA_ACCESS_GROUP)
729 AC_DEFINE_UNQUOTED(PA_ACCESS_GROUP,"$PA_ACCESS_GROUP", [Access group])
730
731 #### PulseAudio system runtime dir ####
732 PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
733 AC_SUBST(PA_SYSTEM_RUNTIME_PATH)
734
735 ###################################
736 # Output #
737 ###################################
738
739 AC_ARG_ENABLE(
740 [static-bins],
741 AC_HELP_STRING([--enable-static-bins],[Statically link executables.]),
742 [STATIC_BINS=1], [STATIC_BINS=0])
743 AM_CONDITIONAL([STATIC_BINS], [test "x$STATIC_BINS" = "x1"])
744
745 AC_ARG_WITH(
746 [preopen-mods],
747 AC_HELP_STRING([--with-preopen-mods],[Modules to preopen in daemon (default: all).]),
748 [PREOPEN_MODS=$withval], [PREOPEN_MODS="all"])
749 AM_CONDITIONAL([PREOPEN_MODS], [test "x$PREOPEN_MODS" != "xall"])
750 if test "x$PREOPEN_MODS" != "xall" ; then
751 tmpLIBS=""
752 for mod in $PREOPEN_MODS; do
753 tmpLIBS="$tmpLIBS module-$mod.la"
754 done
755 PREOPEN_MODS="$tmpLIBS"
756 AC_SUBST(PREOPEN_MODS)
757 fi
758
759 AC_ARG_WITH(
760 [module-dir],
761 AC_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules/]),
762 [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules/"])
763
764 AC_SUBST(modlibexecdir)
765
766 AC_ARG_ENABLE(
767 [force-preopen],
768 AC_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),
769 [FORCE_PREOPEN=1], [FORCE_PREOPEN=0])
770 AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "x1"])
771
772 AC_CONFIG_FILES([
773 Makefile
774 src/Makefile
775 po/Makefile.in
776 libpulse.pc
777 libpulse-simple.pc
778 libpulse-browse.pc
779 libpulse-mainloop-glib.pc
780 doxygen/Makefile
781 doxygen/doxygen.conf
782 src/pulse/version.h
783 ])
784 AC_OUTPUT
785
786 # ==========================================================================
787 ENABLE_X11=no
788 if test "x$HAVE_X11" = "x1" ; then
789 ENABLE_X11=yes
790 fi
791
792 ENABLE_OSS=no
793 if test "x$HAVE_OSS" = "x1" ; then
794 ENABLE_OSS=yes
795 fi
796
797 ENABLE_ALSA=no
798 if test "x$HAVE_ALSA" = "x1" ; then
799 ENABLE_ALSA=yes
800 fi
801
802 ENABLE_SOLARIS=no
803 if test "x$HAVE_SOLARIS" = "x1" ; then
804 ENABLE_SOLARIS=yes
805 fi
806
807 ENABLE_GLIB20=no
808 if test "x$HAVE_GLIB20" = "x1" ; then
809 ENABLE_GLIB20=yes
810 fi
811
812 ENABLE_GCONF=no
813 if test "x$HAVE_GCONF" = "x1" ; then
814 ENABLE_GCONF=yes
815 fi
816
817 ENABLE_AVAHI=no
818 if test "x$HAVE_AVAHI" = "x1" ; then
819 ENABLE_AVAHI=yes
820 fi
821
822 ENABLE_JACK=no
823 if test "x$HAVE_JACK" = "x1" ; then
824 ENABLE_JACK=yes
825 fi
826
827 ENABLE_LIBASYNCNS=no
828 if test "x$HAVE_LIBASYNCNS" = "x1" ; then
829 ENABLE_LIBASYNCNS=yes
830 fi
831
832 ENABLE_LIRC=no
833 if test "x$HAVE_LIRC" = "x1" ; then
834 ENABLE_LIRC=yes
835 fi
836
837 ENABLE_HAL=no
838 if test "x$HAVE_HAL" = "x1" ; then
839 ENABLE_HAL=yes
840 fi
841
842 ENABLE_TCPWRAP=no
843 if test "x${LIBWRAP_LIBS}" != x ; then
844 ENABLE_TCPWRAP=yes
845 fi
846
847 echo "
848 ---{ $PACKAGE_NAME $VERSION }---
849
850 prefix: ${prefix}
851 sysconfdir: ${sysconfdir}
852 localstatedir: ${localstatedir}
853 System Runtime Path: ${PA_SYSTEM_RUNTIME_PATH}
854 Compiler: ${CC}
855 CFLAGS: ${CFLAGS}
856 Have X11: ${ENABLE_X11}
857 Enable OSS: ${ENABLE_OSS}
858 Enable Alsa: ${ENABLE_ALSA}
859 Enable Solaris: ${ENABLE_SOLARIS}
860 Enable GLib 2.0: ${ENABLE_GLIB20}
861 Enable GConf: ${ENABLE_GCONF}
862 Enable Avahi: ${ENABLE_AVAHI}
863 Enable Jack: ${ENABLE_JACK}
864 Enable Async DNS: ${ENABLE_LIBASYNCNS}
865 Enable LIRC: ${ENABLE_LIRC}
866 Enable HAL: ${ENABLE_HAL}
867 Enable TCP Wrappers: ${ENABLE_TCPWRAP}
868 System User: ${PA_SYSTEM_USER}
869 System Group: ${PA_SYSTEM_GROUP}
870 Realtime Group: ${PA_REALTIME_GROUP}
871 Access Group: ${PA_ACCESS_GROUP}
872 "