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