update todo
[pulseaudio.git] / configure.ac
blob68d9d5d52133f41d30fb4646926547eddba24acf
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 # $Id$
6 # This file is part of PulseAudio.
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.
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.
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.
22 AC_PREREQ(2.57)
24 m4_define(PA_MAJOR, [0])
25 m4_define(PA_MINOR, [9])
26 m4_define(PA_MICRO, [4])
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])
33 AC_SUBST(PA_MAJORMINOR, "PA_MAJOR.PA_MINOR")
34 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/pulseaudio/])
36 AC_SUBST(PA_API_VERSION, 10)
37 AC_SUBST(PA_PROTOCOL_VERSION, 10)
39 AC_SUBST(LIBPULSE_VERSION_INFO, [0:2:0])
40 AC_SUBST(LIBPULSECORE_VERSION_INFO, [1:1: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:1:0])
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}"
50 #### Platform hacks ####
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
60 #### Checks for programs. ####
62 # CC
64 AC_PROG_CC
65 AC_PROG_GCC_TRADITIONAL
66 AC_GNU_SOURCE
68 # M4
70 AC_PATH_PROG([M4], [m4 gm4], [no])
71 if test "x$M4" = xno ; then
72    AC_MSG_ERROR([m4 missing])
75 # GCC flags
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
85 # If using GCC specify some additional parameters
86 if test "x$GCC" = "xyes" ; then
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"
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 
103 #### libtool stuff ####
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)
114 if test "x$enable_ltdl_install" = "xno" && test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then
115     AC_MSG_ERROR([[
117         *** Cannot find the libltdl development files.
118         *** Maybe you need to install the libltdl-dev package.
119         ]])
122 #### Determine build environment ####
124 os_is_win32=0
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
133 AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1")
135 ###################################
136 #   Basic environment checks      #
137 ###################################
139 #### Checks for header files. ####
141 # ISO
142 AC_HEADER_STDC
144 # POSIX
145 AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
146     netinet/in_systm.h netinet/ip.h netinet/tcp.h pwd.h sched.h \
147     sys/resource.h sys/select.h sys/socket.h sys/wait.h \
148     syslog.h])
149 AC_CHECK_HEADERS([regex.h], [HAVE_REGEX=1], [HAVE_REGEX=0])
150 AC_CHECK_HEADERS([sys/un.h], [HAVE_AF_UNIX=1], [HAVE_AF_UNIX=0])
152 AM_CONDITIONAL(HAVE_REGEX, test "x$HAVE_REGEX" = "x1")
153 AM_CONDITIONAL(HAVE_AF_UNIX, test "x$HAVE_AF_UNIX" = "x1")
155 # XPG4-UNIX
156 AC_CHECK_HEADERS([sys/poll.h])
158 # Linux
159 AC_CHECK_HEADERS([linux/input.h], [HAVE_EVDEV=1], [HAVE_EVDEV=0])
161 AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = "x1"])
163 AC_CHECK_HEADERS([sys/prctl.h])
165 # Solaris
166 AC_CHECK_HEADERS([sys/filio.h])
168 # Windows
169 AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
171 # Other
172 AC_CHECK_HEADERS([sys/ioctl.h])
174 #### Typdefs, structures, etc. ####
176 AC_C_CONST
177 AC_C_BIGENDIAN
178 AC_TYPE_PID_T
179 AC_TYPE_SIZE_T
180 AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long],
181     [Define ssize_t if it is not done by the standard libs.])])
182 AC_TYPE_OFF_T
183 AC_TYPE_SIGNAL
184 AC_TYPE_UID_T
186 AC_CHECK_DEFINE([SIGXCPU], [signal.h], [
187 HAVE_SIGXCPU=1
188 AC_DEFINE([HAVE_SIGXCPU], 1, [Have SIGXCPU?])
189 ], [HAVE_SIGXCPU=0])
190 AM_CONDITIONAL(HAVE_SIGXCPU, test "x$HAVE_SIGXCPU" = "x1")
192 # Solaris lacks this
193 AC_CHECK_DEFINE([INADDR_NONE], [netinet/in.h], [],
194     [AC_CHECK_DEFINE([INADDR_NONE], [winsock2.h], [],
195         [AC_DEFINE([INADDR_NONE],  [0xffffffff], [Define INADDR_NONE if not found in <netinet/in.h>])])])
197 #### Check for libs ####
199 # ISO
200 AC_SEARCH_LIBS([pow], [m])
202 # POSIX
203 AC_SEARCH_LIBS([sched_setscheduler], [rt])
204 AC_SEARCH_LIBS([dlopen], [dl])
206 # BSD
207 AC_SEARCH_LIBS([connect], [socket])
209 # Non-standard
211 # This magic is needed so we do not needlessly add static libs to the win32
212 # build, disabling its ability to make dlls.
213 AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])])
215 #### Check for functions ####
217 # POSIX
218 AC_FUNC_FORK
219 AC_FUNC_GETGROUPS
220 AC_FUNC_SELECT_ARGTYPES
221 AC_CHECK_FUNCS([chmod chown getaddrinfo getgrgid_r getpwuid_r gettimeofday \
222     getuid inet_ntop inet_pton nanosleep pipe setpgid setsid sigaction sleep])
223 AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
225 AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
227 # X/OPEN
228 AC_CHECK_FUNCS([readlink])
230 # SUSv2
231 AC_CHECK_FUNCS([ctime_r usleep])
233 # SUSv3
234 AC_CHECK_FUNCS([strerror_r])
236 # BSD
237 AC_CHECK_FUNCS([lstat])
239 # Non-standard
241 AC_CHECK_FUNCS(setresuid)
242 AC_CHECK_FUNCS(setresgid)
243 AC_CHECK_FUNCS(setreuid)
244 AC_CHECK_FUNCS(setregid)
245 AC_CHECK_FUNCS(seteuid)
246 AC_CHECK_FUNCS(setegid)
248 #### POSIX threads ####
250 ACX_PTHREAD
252 #### Large File-Support (LFS) ####
254 AC_SYS_LARGEFILE
256 # Check for open64 to know if the current system does have open64() and similar functions
257 AC_CHECK_FUNCS([open64])
259 #### [lib]iconv ####
261 AM_ICONV
263 ###################################
264 #      External libraries         #
265 ###################################
267 #### X11 (optional) ####
269 HAVE_X11=0
271 # The macro tests the host, not the build target
272 if test "x$os_is_win32" != "x1" ; then
273     AC_PATH_XTRA
274     test "x$no_x" != "xyes" && HAVE_X11=1
277 AC_SUBST(HAVE_X11)
278 AM_CONDITIONAL(HAVE_X11, test "x$HAVE_X11" = "x1")
279 if test "x$HAVE_X11" = "x1" ; then
280     AC_DEFINE([HAVE_X11], 1, [Have X11])
283 #### Capabilities (optional) ####
285 CAP_LIBS=''
287 AC_ARG_WITH(
288         [caps],
289         AC_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.]))
291 if test "x${with_caps}" != "xno"; then
292     AC_SEARCH_LIBS([cap_init], [cap], [], [
293                     if test "x${with_caps}" = "xyes" ; then
294                         AC_MSG_ERROR([*** POSIX caps libraries not found])
295                     fi])
296     AC_CHECK_HEADERS([sys/capability.h], [], [
297                     if test "x${with_caps}" = "xyes" ; then
298                         AC_MSG_ERROR([*** POSIX caps headers not found])
299                     fi])
302 #### pkg-config ####
304 # Check for pkg-config manually first, as if its not installed the
305 # PKG_PROG_PKG_CONFIG macro won't be defined.
306 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
308 if test x"$have_pkg_config" = "xno"; then
309     AC_MSG_ERROR(pkg-config is required to install this program)
312 PKG_PROG_PKG_CONFIG
314 #### Sample rate conversion ####
316 PKG_CHECK_MODULES(LIBSAMPLERATE, [ samplerate >= 0.1.0 ])
317 AC_SUBST(LIBSAMPLERATE_CFLAGS)
318 AC_SUBST(LIBSAMPLERATE_LIBS)
320 #### Sound file ####
322 PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
323 AC_SUBST(LIBSNDFILE_CFLAGS)
324 AC_SUBST(LIBSNDFILE_LIBS)
326 #### OSS support (optional) ####
328 AC_ARG_ENABLE([oss], 
329     AC_HELP_STRING([--disable-oss], [Disable optional OSS support]), 
330         [
331             case "${enableval}" in
332                 yes) oss=yes ;;
333                 no) oss=no ;;
334                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
335             esac
336         ],
337         [oss=auto])
339 if test "x${oss}" != xno ; then
340     AC_CHECK_HEADERS([sys/soundcard.h],
341         [
342             HAVE_OSS=1
343             AC_DEFINE([HAVE_OSS], 1, [Have OSS?])
344         ],
345         [
346             HAVE_OSS=0
347             if test "x$oss" = xyes ; then
348                 AC_MSG_ERROR([*** OSS support not found])
349             fi
350         ])
351 else
352     HAVE_OSS=0
355 AC_SUBST(HAVE_OSS)
356 AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1])
359 #### ALSA support (optional) ####
361 AC_ARG_ENABLE([alsa], 
362     AC_HELP_STRING([--disable-alsa], [Disable optional ALSA support]), 
363         [
364             case "${enableval}" in
365                 yes) alsa=yes ;;
366                 no) alsa=no ;;
367                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-alsa) ;;
368             esac
369         ],
370         [alsa=auto])
372 if test "x${alsa}" != xno ; then
373     PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ],
374         [
375             HAVE_ALSA=1
376             AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])
377         ],
378         [
379             HAVE_ALSA=0
380             if test "x$alsa" = xyes ; then
381                 AC_MSG_ERROR([*** ALSA support not found])
382             fi
383         ])
384 else
385     HAVE_ALSA=0
388 AC_SUBST(ASOUNDLIB_CFLAGS)
389 AC_SUBST(ASOUNDLIB_LIBS) 
390 AC_SUBST(HAVE_ALSA)
391 AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1])
393 #### Solaris audio support (optional) ####
395 AC_ARG_ENABLE([solaris], 
396     AC_HELP_STRING([--disable-solaris], [Disable optional Solaris audio support]), 
397         [
398             case "${enableval}" in
399                 yes) solaris=yes ;;
400                 no) solaris=no ;;
401                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-solaris) ;;
402             esac
403         ],
404         [solaris=auto])
406 if test "x${solaris}" != xno ; then
407     AC_CHECK_HEADERS([sys/audio.h],
408         [
409             HAVE_SOLARIS=1
410             AC_DEFINE([HAVE_SOLARIS], 1, [Have Solaris audio?])
411         ],
412         [
413             HAVE_SOLARIS=0
414             if test "x$solaris" = xyes ; then
415                 AC_MSG_ERROR([*** Solaris audio support not found])
416             fi
417         ])
418 else
419     HAVE_SOLARIS=0
422 AC_SUBST(HAVE_SOLARIS)
423 AM_CONDITIONAL([HAVE_SOLARIS], [test "x$HAVE_SOLARIS" = x1])
425 #### GLib 2 support (optional) ####
427 AC_ARG_ENABLE([glib2], 
428     AC_HELP_STRING([--disable-glib2], [Disable optional GLib 2 support]), 
429         [
430             case "${enableval}" in
431                 yes) glib2=yes ;;
432                 no) glib2=no ;;
433                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-glib2) ;;
434             esac
435         ],
436         [glib2=auto])
438 if test "x${glib2}" != xno ; then
439     PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ],
440         HAVE_GLIB20=1,
441         [
442             HAVE_GLIB20=0
443             if test "x$glib2" = xyes ; then
444                 AC_MSG_ERROR([*** GLib 2 support not found])
445             fi
446         ])
447 else
448     HAVE_GLIB20=0
451 AC_SUBST(GLIB20_CFLAGS)
452 AC_SUBST(GLIB20_LIBS)
453 AC_SUBST(HAVE_GLIB20)
454 AM_CONDITIONAL([HAVE_GLIB20], [test "x$HAVE_GLIB20" = x1])
456 #### GConf support (optional) ####
458 AC_ARG_ENABLE([gconf], 
459     AC_HELP_STRING([--disable-gconf], [Disable optional GConf support]), 
460         [
461             case "${enableval}" in
462                 yes) gconf=yes ;;
463                 no) gconf=no ;;
464                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gconf) ;;
465             esac
466         ],
467         [glib=auto])
469 if test "x${gconf}" != xno ; then
470     PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 ],
471         HAVE_GCONF=1,
472         [
473             HAVE_GCONF=0
474             if test "x$gconf" = xyes ; then
475                 AC_MSG_ERROR([*** GConf support not found])
476             fi
477         ])
478 else
479     HAVE_GCONF=0
482 AC_SUBST(GCONF_CFLAGS)
483 AC_SUBST(GCONF_LIBS)
484 AC_SUBST(HAVE_GCONF)
485 AM_CONDITIONAL([HAVE_GCONF], [test "x$HAVE_GCONF" = x1])
487 #### Avahi support (optional) ####
489 AC_ARG_ENABLE([avahi], 
490     AC_HELP_STRING([--disable-avahi], [Disable optional Avahi support]), 
491         [
492             case "${enableval}" in
493                 yes) avahi=yes ;;
494                 no) avahi=no ;;
495                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-avahi) ;;
496             esac
497         ],
498         [avahi=auto])
500 if test "x${avahi}" != xno ; then
501     PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.0 ],
502         HAVE_AVAHI=1,
503         [
504                 HAVE_AVAHI=0
505                 if test "x$avahi" = xyes ; then
506                         AC_MSG_ERROR([*** Avahi support not found])
507                 fi
508         ])
509 else
510     HAVE_AVAHI=0
513 AC_SUBST(AVAHI_CFLAGS)
514 AC_SUBST(AVAHI_LIBS)
515 AC_SUBST(HAVE_AVAHI)
516 AM_CONDITIONAL([HAVE_AVAHI], [test "x$HAVE_AVAHI" = x1])
518 ### LIBOIL ####
520 PKG_CHECK_MODULES(LIBOIL, [ liboil-0.3 >= 0.3.0 ])
521 AC_SUBST(LIBOIL_CFLAGS)
522 AC_SUBST(LIBOIL_LIBS)
524 ### JACK (optional) ####
526 AC_ARG_ENABLE([jack], 
527     AC_HELP_STRING([--disable-jack], [Disable optional JACK support]), 
528         [
529             case "${enableval}" in
530                 yes) jack=yes ;;
531                 no) jack=no ;;
532                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
533             esac
534         ],
535         [jack=auto])
537 if test "x${jack}" != xno ; then
538     PKG_CHECK_MODULES(JACK, [ jack >= 0.100 ],
539         HAVE_JACK=1,
540         [
541             HAVE_JACK=0
542             if test "x$jack" = xyes ; then
543                 AC_MSG_ERROR([*** JACK support not found])
544             fi
545         ])
546 else
547     HAVE_JACK=0
550 AC_SUBST(JACK_CFLAGS)
551 AC_SUBST(JACK_LIBS)
552 AC_SUBST(HAVE_JACK)
553 AM_CONDITIONAL([HAVE_JACK], [test "x$HAVE_JACK" = x1])
555 #### Async DNS support (optional) ####
557 AC_ARG_ENABLE([asyncns], 
558     AC_HELP_STRING([--disable-asyncns], [Disable optional Async DNS support]), 
559         [
560             case "${enableval}" in
561                 yes) asyncns=yes ;;
562                 no) asyncns=no ;;
563                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-asyncns) ;;
564             esac
565         ],
566         [asyncns=auto])
568 if test "x${asyncns}" != xno ; then
569     PKG_CHECK_MODULES(LIBASYNCNS, [ libasyncns >= 0.1 ],
570         HAVE_LIBASYNCNS=1,
571         [
572             HAVE_LIBASYNCNS=0
573             if test "x$asyncns" = xyes ; then
574                 AC_MSG_ERROR([*** Async DNS support not found])
575             fi
576         ])
577 else
578     HAVE_LIBASYNCNS=0
581 AC_SUBST(LIBASYNCNS_CFLAGS)
582 AC_SUBST(LIBASYNCNS_LIBS)
583 AC_SUBST(HAVE_LIBASYNCNS)
584 AM_CONDITIONAL([HAVE_LIBASYNCNS], [test "x$HAVE_LIBASYNCNS" = x1])
586 if test "x$HAVE_LIBASYNCNS" != "x0" ; then
587    AC_DEFINE([HAVE_LIBASYNCNS], 1, [Have libasyncns?])
590 #### TCP wrappers (optional) ####
592 AC_ARG_ENABLE([tcpwrap], 
593     AC_HELP_STRING([--disable-tcpwrap], [Disable optional TCP wrappers support]), 
594         [
595             case "${enableval}" in
596                 yes) tcpwrap=yes ;;
597                 no) tcpwrap=no ;;
598                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
599             esac
600         ],
601         [tcpwrap=auto])
603 if test "x${tcpwrap}" != xno ; then
604     ACX_LIBWRAP
605     if test "x${LIBWRAP_LIBS}" = x && test "x$tcpwrap" = xyes ; then
606         AC_MSG_ERROR([*** TCP wrappers support not found])
607     fi
608 else
609     LIBWRAP_LIBS=
612 AC_SUBST(LIBWRAP_LIBS)
614 #### LIRC support (optional) ####
616 AC_ARG_ENABLE([lirc], 
617     AC_HELP_STRING([--disable-lirc], [Disable optional LIRC support]), 
618         [
619             case "${enableval}" in
620                 yes) lirc=yes ;;
621                 no) lirc=no ;;
622                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-lirc) ;;
623             esac
624         ],
625         [lirc=auto])
627 if test "x${lirc}" != xno ; then
628     ACX_LIRC
629     if test "x${HAVE_LIRC}" = x0 && test "x$lirc" = xyes ; then
630         AC_MSG_ERROR([*** LIRC support not found])
631     fi
632 else
633     HAVE_LIRC=0
636 AC_SUBST(LIRC_CFLAGS)
637 AC_SUBST(LIRC_LIBS)
638 AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1])
640 #### HAL support (optional) ####
642 AC_ARG_ENABLE([hal], 
643     AC_HELP_STRING([--disable-hal], [Disable optional HAL support]), 
644         [
645             case "${enableval}" in
646                 yes) hal=yes ;;
647                 no) hal=no ;;
648                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal) ;;
649             esac
650         ],
651         [hal=auto])
653 if test "x${hal}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
654     PKG_CHECK_MODULES(HAL, [ hal >= 0.5.7 ],
655         HAVE_HAL=1,
656         [
657             HAVE_HAL=0
658             if test "x$hal" = xyes ; then
659                 AC_MSG_ERROR([*** HAL support not found])
660             fi
661         ])
662 else
663     HAVE_HAL=0
666 AC_SUBST(HAL_CFLAGS)
667 AC_SUBST(HAL_LIBS)
668 AC_SUBST(HAVE_HAL)
669 AM_CONDITIONAL([HAVE_HAL], [test "x$HAVE_HAL" = x1])
671 #### PulseAudio system group & user  #####
673 AC_ARG_WITH(system_user, AS_HELP_STRING([--with-system-user=<user>],[User for running the PulseAudio daemon as a system-wide instance (pulse)]))
674 if test -z "$with_system_user" ; then
675     PA_SYSTEM_USER=pulse
676 else
677     PA_SYSTEM_USER=$with_system_user
679 AC_SUBST(PA_SYSTEM_USER)
680 AC_DEFINE_UNQUOTED(PA_SYSTEM_USER,"$PA_SYSTEM_USER", [User for running the PulseAudio system daemon])
682 AC_ARG_WITH(system_group,AS_HELP_STRING([--with-system-group=<group>],[Group for running the PulseAudio daemon as a system-wide instance (pulse)]))
683 if test -z "$with_system_group" ; then
684     PA_SYSTEM_GROUP=pulse
685 else
686     PA_SYSTEM_GROUP=$with_system_group
688 AC_SUBST(PA_SYSTEM_GROUP)
689 AC_DEFINE_UNQUOTED(PA_SYSTEM_GROUP,"$PA_SYSTEM_GROUP", [Group for the PulseAudio system daemon])
691 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)]))
692 if test -z "$with_realtime_group" ; then
693     PA_REALTIME_GROUP=realtime
694 else
695     PA_REALTIME_GROUP=$with_realtime_group
697 AC_SUBST(PA_REALTIME_GROUP)
698 AC_DEFINE_UNQUOTED(PA_REALTIME_GROUP,"$PA_REALTIME_GROUP", [Realtime group])
700 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)]))
701 if test -z "$with_access_group" ; then
702     PA_ACCESS_GROUP=pulse-access
703 else
704     PA_ACCESS_GROUP=$with_access_group
706 AC_SUBST(PA_ACCESS_GROUP)
707 AC_DEFINE_UNQUOTED(PA_ACCESS_GROUP,"$PA_ACCESS_GROUP", [Access group])
709 #### PulseAudio system runtime dir ####
710 PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
711 AC_SUBST(PA_SYSTEM_RUNTIME_PATH)
713 ###################################
714 #            Output               #
715 ###################################
717 AC_ARG_ENABLE(
718         [static-bins],
719         AC_HELP_STRING([--enable-static-bins],[Statically link executables.]),
720         [STATIC_BINS=1], [STATIC_BINS=0])
721 AM_CONDITIONAL([STATIC_BINS], [test "x$STATIC_BINS" = "x1"])
723 AC_ARG_WITH(
724         [preopen-mods],
725         AC_HELP_STRING([--with-preopen-mods],[Modules to preopen in daemon (default: all).]),
726         [PREOPEN_MODS=$withval], [PREOPEN_MODS="all"])
727 AM_CONDITIONAL([PREOPEN_MODS], [test "x$PREOPEN_MODS" != "xall"])
728 if test "x$PREOPEN_MODS" != "xall" ; then
729     tmpLIBS=""
730     for mod in $PREOPEN_MODS; do
731         tmpLIBS="$tmpLIBS module-$mod.la"
732     done
733     PREOPEN_MODS="$tmpLIBS"
734     AC_SUBST(PREOPEN_MODS)
737 AC_ARG_WITH(
738         [module-dir],
739         AC_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules/]),
740         [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules/"])
742 AC_SUBST(modlibexecdir)
744 AC_ARG_ENABLE(
745         [force-preopen],
746         AC_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),
747         [FORCE_PREOPEN=1], [FORCE_PREOPEN=0])
748 AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "x1"])
750 AC_CONFIG_FILES([
751 Makefile
752 src/Makefile
753 libpulse.pc
754 libpulse-simple.pc
755 libpulse-browse.pc
756 libpulse-mainloop-glib.pc
757 doxygen/Makefile
758 doxygen/doxygen.conf
759 src/pulse/version.h
761 AC_OUTPUT
763 # ==========================================================================
764 ENABLE_X11=no
765 if test "x$HAVE_X11" = "x1" ; then
766    ENABLE_X11=yes
769 ENABLE_OSS=no
770 if test "x$HAVE_OSS" = "x1" ; then
771    ENABLE_OSS=yes
774 ENABLE_ALSA=no
775 if test "x$HAVE_ALSA" = "x1" ; then
776    ENABLE_ALSA=yes
779 ENABLE_SOLARIS=no
780 if test "x$HAVE_SOLARIS" = "x1" ; then
781    ENABLE_SOLARIS=yes
784 ENABLE_GLIB20=no
785 if test "x$HAVE_GLIB20" = "x1" ; then
786    ENABLE_GLIB20=yes
789 ENABLE_GCONF=no
790 if test "x$HAVE_GCONF" = "x1" ; then
791    ENABLE_GCONF=yes
794 ENABLE_AVAHI=no
795 if test "x$HAVE_AVAHI" = "x1" ; then
796    ENABLE_AVAHI=yes
799 ENABLE_JACK=no
800 if test "x$HAVE_JACK" = "x1" ; then
801    ENABLE_JACK=yes
804 ENABLE_LIBASYNCNS=no
805 if test "x$HAVE_LIBASYNCNS" = "x1" ; then
806    ENABLE_LIBASYNCNS=yes
809 ENABLE_LIRC=no
810 if test "x$HAVE_LIRC" = "x1" ; then
811    ENABLE_LIRC=yes
814 ENABLE_HAL=no
815 if test "x$HAVE_HAL" = "x1" ; then
816    ENABLE_HAL=yes
819 ENABLE_TCPWRAP=no
820 if test "x${LIBWRAP_LIBS}" != x ; then
821    ENABLE_TCPWRAP=yes
824 echo "
825  ---{ $PACKAGE_NAME $VERSION }---
827     prefix:                 ${prefix}
828     sysconfdir:             ${sysconfdir}
829     localstatedir:          ${localstatedir}
830     System Runtime Path:    ${PA_SYSTEM_RUNTIME_PATH}
831     Compiler:               ${CC}
832     CFLAGS:                 ${CFLAGS}
833     Have X11:               ${ENABLE_X11}
834     Enable OSS:             ${ENABLE_OSS}
835     Enable Alsa:            ${ENABLE_ALSA}
836     Enable Solaris:         ${ENABLE_SOLARIS}
837     Enable GLib 2.0:        ${ENABLE_GLIB20}
838     Enable GConf:           ${ENABLE_GCONF}
839     Enable Avahi:           ${ENABLE_AVAHI}
840     Enable Jack:            ${ENABLE_JACK}
841     Enable Async DNS:       ${ENABLE_LIBASYNCNS}
842     Enable LIRC:            ${ENABLE_LIRC}
843     Enable HAL:             ${ENABLE_HAL}
844     Enable TCP Wrappers:    ${ENABLE_TCPWRAP}
845     System User:            ${PA_SYSTEM_USER}
846     System Group:           ${PA_SYSTEM_GROUP}
847     Realtime Group:         ${PA_REALTIME_GROUP}
848     Access Group:           ${PA_ACCESS_GROUP}