]> code.delx.au - pulseaudio/blob - configure.ac
bump soname and stuff for fedora pre-release
[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, 10)
41
42 AC_SUBST(LIBPULSE_VERSION_INFO, [2:1:2])
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"
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_SUBST(LTDLINCL)
114 AC_SUBST(LIBLTDL)
115 AC_LIBTOOL_DLOPEN
116 AC_LIBTOOL_WIN32_DLL
117 AC_PROG_LIBTOOL
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])
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 #### Sample rate conversion ####
327
328 PKG_CHECK_MODULES(LIBSAMPLERATE, [ samplerate >= 0.1.0 ])
329 AC_SUBST(LIBSAMPLERATE_CFLAGS)
330 AC_SUBST(LIBSAMPLERATE_LIBS)
331
332 #### Sound file ####
333
334 PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
335 AC_SUBST(LIBSNDFILE_CFLAGS)
336 AC_SUBST(LIBSNDFILE_LIBS)
337
338 #### atomic-ops ###
339
340 AC_CHECK_HEADERS([atomic_ops.h], [], [
341 AC_MSG_ERROR([*** libatomic-ops headers not found])
342 ])
343
344 # Win32 does not need the lib and breaks horribly if we try to include it
345 if test "x$os_is_win32" != "x1" ; then
346 LIBS="$LIBS -latomic_ops"
347 fi
348
349 #### OSS support (optional) ####
350
351 AC_ARG_ENABLE([oss],
352 AC_HELP_STRING([--disable-oss], [Disable optional OSS support]),
353 [
354 case "${enableval}" in
355 yes) oss=yes ;;
356 no) oss=no ;;
357 *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
358 esac
359 ],
360 [oss=auto])
361
362 if test "x${oss}" != xno ; then
363 AC_CHECK_HEADERS([sys/soundcard.h],
364 [
365 HAVE_OSS=1
366 AC_DEFINE([HAVE_OSS], 1, [Have OSS?])
367 ],
368 [
369 HAVE_OSS=0
370 if test "x$oss" = xyes ; then
371 AC_MSG_ERROR([*** OSS support not found])
372 fi
373 ])
374 else
375 HAVE_OSS=0
376 fi
377
378 AC_SUBST(HAVE_OSS)
379 AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1])
380
381
382 #### ALSA support (optional) ####
383
384 AC_ARG_ENABLE([alsa],
385 AC_HELP_STRING([--disable-alsa], [Disable optional ALSA support]),
386 [
387 case "${enableval}" in
388 yes) alsa=yes ;;
389 no) alsa=no ;;
390 *) AC_MSG_ERROR(bad value ${enableval} for --disable-alsa) ;;
391 esac
392 ],
393 [alsa=auto])
394
395 if test "x${alsa}" != xno ; then
396 PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ],
397 [
398 HAVE_ALSA=1
399 AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])
400 ],
401 [
402 HAVE_ALSA=0
403 if test "x$alsa" = xyes ; then
404 AC_MSG_ERROR([*** ALSA support not found])
405 fi
406 ])
407 else
408 HAVE_ALSA=0
409 fi
410
411 AC_SUBST(ASOUNDLIB_CFLAGS)
412 AC_SUBST(ASOUNDLIB_LIBS)
413 AC_SUBST(HAVE_ALSA)
414 AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1])
415
416 #### Solaris audio support (optional) ####
417
418 AC_ARG_ENABLE([solaris],
419 AC_HELP_STRING([--disable-solaris], [Disable optional Solaris audio support]),
420 [
421 case "${enableval}" in
422 yes) solaris=yes ;;
423 no) solaris=no ;;
424 *) AC_MSG_ERROR(bad value ${enableval} for --disable-solaris) ;;
425 esac
426 ],
427 [solaris=auto])
428
429 if test "x${solaris}" != xno ; then
430 AC_CHECK_HEADERS([sys/audio.h],
431 [
432 HAVE_SOLARIS=1
433 AC_DEFINE([HAVE_SOLARIS], 1, [Have Solaris audio?])
434 ],
435 [
436 HAVE_SOLARIS=0
437 if test "x$solaris" = xyes ; then
438 AC_MSG_ERROR([*** Solaris audio support not found])
439 fi
440 ])
441 else
442 HAVE_SOLARIS=0
443 fi
444
445 AC_SUBST(HAVE_SOLARIS)
446 AM_CONDITIONAL([HAVE_SOLARIS], [test "x$HAVE_SOLARIS" = x1])
447
448 #### GLib 2 support (optional) ####
449
450 AC_ARG_ENABLE([glib2],
451 AC_HELP_STRING([--disable-glib2], [Disable optional GLib 2 support]),
452 [
453 case "${enableval}" in
454 yes) glib2=yes ;;
455 no) glib2=no ;;
456 *) AC_MSG_ERROR(bad value ${enableval} for --disable-glib2) ;;
457 esac
458 ],
459 [glib2=auto])
460
461 if test "x${glib2}" != xno ; then
462 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ],
463 HAVE_GLIB20=1,
464 [
465 HAVE_GLIB20=0
466 if test "x$glib2" = xyes ; then
467 AC_MSG_ERROR([*** GLib 2 support not found])
468 fi
469 ])
470 else
471 HAVE_GLIB20=0
472 fi
473
474 AC_SUBST(GLIB20_CFLAGS)
475 AC_SUBST(GLIB20_LIBS)
476 AC_SUBST(HAVE_GLIB20)
477 AM_CONDITIONAL([HAVE_GLIB20], [test "x$HAVE_GLIB20" = x1])
478
479 #### GConf support (optional) ####
480
481 AC_ARG_ENABLE([gconf],
482 AC_HELP_STRING([--disable-gconf], [Disable optional GConf support]),
483 [
484 case "${enableval}" in
485 yes) gconf=yes ;;
486 no) gconf=no ;;
487 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gconf) ;;
488 esac
489 ],
490 [glib=auto])
491
492 if test "x${gconf}" != xno ; then
493 PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 ],
494 HAVE_GCONF=1,
495 [
496 HAVE_GCONF=0
497 if test "x$gconf" = xyes ; then
498 AC_MSG_ERROR([*** GConf support not found])
499 fi
500 ])
501 else
502 HAVE_GCONF=0
503 fi
504
505 AC_SUBST(GCONF_CFLAGS)
506 AC_SUBST(GCONF_LIBS)
507 AC_SUBST(HAVE_GCONF)
508 AM_CONDITIONAL([HAVE_GCONF], [test "x$HAVE_GCONF" = x1])
509
510 #### Avahi support (optional) ####
511
512 AC_ARG_ENABLE([avahi],
513 AC_HELP_STRING([--disable-avahi], [Disable optional Avahi support]),
514 [
515 case "${enableval}" in
516 yes) avahi=yes ;;
517 no) avahi=no ;;
518 *) AC_MSG_ERROR(bad value ${enableval} for --disable-avahi) ;;
519 esac
520 ],
521 [avahi=auto])
522
523 if test "x${avahi}" != xno ; then
524 PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.0 ],
525 HAVE_AVAHI=1,
526 [
527 HAVE_AVAHI=0
528 if test "x$avahi" = xyes ; then
529 AC_MSG_ERROR([*** Avahi support not found])
530 fi
531 ])
532 else
533 HAVE_AVAHI=0
534 fi
535
536 AC_SUBST(AVAHI_CFLAGS)
537 AC_SUBST(AVAHI_LIBS)
538 AC_SUBST(HAVE_AVAHI)
539 AM_CONDITIONAL([HAVE_AVAHI], [test "x$HAVE_AVAHI" = x1])
540
541 ### LIBOIL ####
542
543 PKG_CHECK_MODULES(LIBOIL, [ liboil-0.3 >= 0.3.0 ])
544 AC_SUBST(LIBOIL_CFLAGS)
545 AC_SUBST(LIBOIL_LIBS)
546
547 ### JACK (optional) ####
548
549 AC_ARG_ENABLE([jack],
550 AC_HELP_STRING([--disable-jack], [Disable optional JACK support]),
551 [
552 case "${enableval}" in
553 yes) jack=yes ;;
554 no) jack=no ;;
555 *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
556 esac
557 ],
558 [jack=auto])
559
560 if test "x${jack}" != xno ; then
561 PKG_CHECK_MODULES(JACK, [ jack >= 0.100 ],
562 HAVE_JACK=1,
563 [
564 HAVE_JACK=0
565 if test "x$jack" = xyes ; then
566 AC_MSG_ERROR([*** JACK support not found])
567 fi
568 ])
569 else
570 HAVE_JACK=0
571 fi
572
573 AC_SUBST(JACK_CFLAGS)
574 AC_SUBST(JACK_LIBS)
575 AC_SUBST(HAVE_JACK)
576 AM_CONDITIONAL([HAVE_JACK], [test "x$HAVE_JACK" = x1])
577
578 #### Async DNS support (optional) ####
579
580 AC_ARG_ENABLE([asyncns],
581 AC_HELP_STRING([--disable-asyncns], [Disable optional Async DNS support]),
582 [
583 case "${enableval}" in
584 yes) asyncns=yes ;;
585 no) asyncns=no ;;
586 *) AC_MSG_ERROR(bad value ${enableval} for --disable-asyncns) ;;
587 esac
588 ],
589 [asyncns=auto])
590
591 if test "x${asyncns}" != xno ; then
592 PKG_CHECK_MODULES(LIBASYNCNS, [ libasyncns >= 0.1 ],
593 HAVE_LIBASYNCNS=1,
594 [
595 HAVE_LIBASYNCNS=0
596 if test "x$asyncns" = xyes ; then
597 AC_MSG_ERROR([*** Async DNS support not found])
598 fi
599 ])
600 else
601 HAVE_LIBASYNCNS=0
602 fi
603
604 AC_SUBST(LIBASYNCNS_CFLAGS)
605 AC_SUBST(LIBASYNCNS_LIBS)
606 AC_SUBST(HAVE_LIBASYNCNS)
607 AM_CONDITIONAL([HAVE_LIBASYNCNS], [test "x$HAVE_LIBASYNCNS" = x1])
608
609 if test "x$HAVE_LIBASYNCNS" != "x0" ; then
610 AC_DEFINE([HAVE_LIBASYNCNS], 1, [Have libasyncns?])
611 fi
612
613 #### TCP wrappers (optional) ####
614
615 AC_ARG_ENABLE([tcpwrap],
616 AC_HELP_STRING([--disable-tcpwrap], [Disable optional TCP wrappers support]),
617 [
618 case "${enableval}" in
619 yes) tcpwrap=yes ;;
620 no) tcpwrap=no ;;
621 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
622 esac
623 ],
624 [tcpwrap=auto])
625
626 if test "x${tcpwrap}" != xno ; then
627 ACX_LIBWRAP
628 if test "x${LIBWRAP_LIBS}" = x && test "x$tcpwrap" = xyes ; then
629 AC_MSG_ERROR([*** TCP wrappers support not found])
630 fi
631 else
632 LIBWRAP_LIBS=
633 fi
634
635 AC_SUBST(LIBWRAP_LIBS)
636
637 #### LIRC support (optional) ####
638
639 AC_ARG_ENABLE([lirc],
640 AC_HELP_STRING([--disable-lirc], [Disable optional LIRC support]),
641 [
642 case "${enableval}" in
643 yes) lirc=yes ;;
644 no) lirc=no ;;
645 *) AC_MSG_ERROR(bad value ${enableval} for --disable-lirc) ;;
646 esac
647 ],
648 [lirc=auto])
649
650 if test "x${lirc}" != xno ; then
651 ACX_LIRC
652 if test "x${HAVE_LIRC}" = x0 && test "x$lirc" = xyes ; then
653 AC_MSG_ERROR([*** LIRC support not found])
654 fi
655 else
656 HAVE_LIRC=0
657 fi
658
659 AC_SUBST(LIRC_CFLAGS)
660 AC_SUBST(LIRC_LIBS)
661 AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1])
662
663 #### HAL support (optional) ####
664
665 AC_ARG_ENABLE([hal],
666 AC_HELP_STRING([--disable-hal], [Disable optional HAL support]),
667 [
668 case "${enableval}" in
669 yes) hal=yes ;;
670 no) hal=no ;;
671 *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal) ;;
672 esac
673 ],
674 [hal=auto])
675
676 if test "x${hal}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
677 PKG_CHECK_MODULES(HAL, [ hal >= 0.5.7 ],
678 HAVE_HAL=1,
679 [
680 HAVE_HAL=0
681 if test "x$hal" = xyes ; then
682 AC_MSG_ERROR([*** HAL support not found])
683 fi
684 ])
685 else
686 HAVE_HAL=0
687 fi
688
689 AC_SUBST(HAL_CFLAGS)
690 AC_SUBST(HAL_LIBS)
691 AC_SUBST(HAVE_HAL)
692 AM_CONDITIONAL([HAVE_HAL], [test "x$HAVE_HAL" = x1])
693
694 #### PulseAudio system group & user #####
695
696 AC_ARG_WITH(system_user, AS_HELP_STRING([--with-system-user=<user>],[User for running the PulseAudio daemon as a system-wide instance (pulse)]))
697 if test -z "$with_system_user" ; then
698 PA_SYSTEM_USER=pulse
699 else
700 PA_SYSTEM_USER=$with_system_user
701 fi
702 AC_SUBST(PA_SYSTEM_USER)
703 AC_DEFINE_UNQUOTED(PA_SYSTEM_USER,"$PA_SYSTEM_USER", [User for running the PulseAudio system daemon])
704
705 AC_ARG_WITH(system_group,AS_HELP_STRING([--with-system-group=<group>],[Group for running the PulseAudio daemon as a system-wide instance (pulse)]))
706 if test -z "$with_system_group" ; then
707 PA_SYSTEM_GROUP=pulse
708 else
709 PA_SYSTEM_GROUP=$with_system_group
710 fi
711 AC_SUBST(PA_SYSTEM_GROUP)
712 AC_DEFINE_UNQUOTED(PA_SYSTEM_GROUP,"$PA_SYSTEM_GROUP", [Group for the PulseAudio system daemon])
713
714 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)]))
715 if test -z "$with_realtime_group" ; then
716 PA_REALTIME_GROUP=pulse-rt
717 else
718 PA_REALTIME_GROUP=$with_realtime_group
719 fi
720 AC_SUBST(PA_REALTIME_GROUP)
721 AC_DEFINE_UNQUOTED(PA_REALTIME_GROUP,"$PA_REALTIME_GROUP", [Realtime group])
722
723 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)]))
724 if test -z "$with_access_group" ; then
725 PA_ACCESS_GROUP=pulse-access
726 else
727 PA_ACCESS_GROUP=$with_access_group
728 fi
729 AC_SUBST(PA_ACCESS_GROUP)
730 AC_DEFINE_UNQUOTED(PA_ACCESS_GROUP,"$PA_ACCESS_GROUP", [Access group])
731
732 #### PulseAudio system runtime dir ####
733 PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
734 AC_SUBST(PA_SYSTEM_RUNTIME_PATH)
735
736 ###################################
737 # Output #
738 ###################################
739
740 AC_ARG_ENABLE(
741 [static-bins],
742 AC_HELP_STRING([--enable-static-bins],[Statically link executables.]),
743 [STATIC_BINS=1], [STATIC_BINS=0])
744 AM_CONDITIONAL([STATIC_BINS], [test "x$STATIC_BINS" = "x1"])
745
746 AC_ARG_WITH(
747 [preopen-mods],
748 AC_HELP_STRING([--with-preopen-mods],[Modules to preopen in daemon (default: all).]),
749 [PREOPEN_MODS=$withval], [PREOPEN_MODS="all"])
750 AM_CONDITIONAL([PREOPEN_MODS], [test "x$PREOPEN_MODS" != "xall"])
751 if test "x$PREOPEN_MODS" != "xall" ; then
752 tmpLIBS=""
753 for mod in $PREOPEN_MODS; do
754 tmpLIBS="$tmpLIBS module-$mod.la"
755 done
756 PREOPEN_MODS="$tmpLIBS"
757 AC_SUBST(PREOPEN_MODS)
758 fi
759
760 AC_ARG_WITH(
761 [module-dir],
762 AC_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules/]),
763 [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules/"])
764
765 AC_SUBST(modlibexecdir)
766
767 AC_ARG_ENABLE(
768 [force-preopen],
769 AC_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),
770 [FORCE_PREOPEN=1], [FORCE_PREOPEN=0])
771 AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "x1"])
772
773 AC_CONFIG_FILES([
774 Makefile
775 src/Makefile
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 "