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