update todo
[pulseaudio.git] / configure.ac
blob07b2cfa12bc5a9c6eb60ce0a5fc6d1d3238051de
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 AC_SEARCH_LIBS([shm_open], [rt])
211 # Non-standard
213 # This magic is needed so we do not needlessly add static libs to the win32
214 # build, disabling its ability to make dlls.
215 AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])])
217 #### Check for functions ####
219 # POSIX
220 AC_FUNC_FORK
221 AC_FUNC_GETGROUPS
222 AC_FUNC_SELECT_ARGTYPES
223 AC_CHECK_FUNCS([chmod chown getaddrinfo getgrgid_r getpwuid_r gettimeofday \
224     getuid inet_ntop inet_pton nanosleep pipe setpgid setsid sigaction sleep])
225 AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
227 AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
229 # X/OPEN
230 AC_CHECK_FUNCS([readlink])
232 # SUSv2
233 AC_CHECK_FUNCS([ctime_r usleep])
235 # SUSv3
236 AC_CHECK_FUNCS([strerror_r])
238 # BSD
239 AC_CHECK_FUNCS([lstat])
241 # Non-standard
243 AC_CHECK_FUNCS(setresuid)
244 AC_CHECK_FUNCS(setresgid)
245 AC_CHECK_FUNCS(setreuid)
246 AC_CHECK_FUNCS(setregid)
247 AC_CHECK_FUNCS(seteuid)
248 AC_CHECK_FUNCS(setegid)
250 #### POSIX threads ####
252 ACX_PTHREAD
254 #### Large File-Support (LFS) ####
256 AC_SYS_LARGEFILE
258 # Check for open64 to know if the current system does have open64() and similar functions
259 AC_CHECK_FUNCS([open64])
261 #### [lib]iconv ####
263 AM_ICONV
265 ###################################
266 #      External libraries         #
267 ###################################
269 #### X11 (optional) ####
271 HAVE_X11=0
273 # The macro tests the host, not the build target
274 if test "x$os_is_win32" != "x1" ; then
275     AC_PATH_XTRA
276     test "x$no_x" != "xyes" && HAVE_X11=1
279 AC_SUBST(HAVE_X11)
280 AM_CONDITIONAL(HAVE_X11, test "x$HAVE_X11" = "x1")
281 if test "x$HAVE_X11" = "x1" ; then
282     AC_DEFINE([HAVE_X11], 1, [Have X11])
285 #### Capabilities (optional) ####
287 CAP_LIBS=''
289 AC_ARG_WITH(
290         [caps],
291         AC_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.]))
293 if test "x${with_caps}" != "xno"; then
294     AC_SEARCH_LIBS([cap_init], [cap], [], [
295                     if test "x${with_caps}" = "xyes" ; then
296                         AC_MSG_ERROR([*** POSIX caps libraries not found])
297                     fi])
298     AC_CHECK_HEADERS([sys/capability.h], [], [
299                     if test "x${with_caps}" = "xyes" ; then
300                         AC_MSG_ERROR([*** POSIX caps headers not found])
301                     fi])
304 #### pkg-config ####
306 # Check for pkg-config manually first, as if its not installed the
307 # PKG_PROG_PKG_CONFIG macro won't be defined.
308 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
310 if test x"$have_pkg_config" = "xno"; then
311     AC_MSG_ERROR(pkg-config is required to install this program)
314 PKG_PROG_PKG_CONFIG
316 #### Sample rate conversion ####
318 PKG_CHECK_MODULES(LIBSAMPLERATE, [ samplerate >= 0.1.0 ])
319 AC_SUBST(LIBSAMPLERATE_CFLAGS)
320 AC_SUBST(LIBSAMPLERATE_LIBS)
322 #### Sound file ####
324 PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
325 AC_SUBST(LIBSNDFILE_CFLAGS)
326 AC_SUBST(LIBSNDFILE_LIBS)
328 #### OSS support (optional) ####
330 AC_ARG_ENABLE([oss], 
331     AC_HELP_STRING([--disable-oss], [Disable optional OSS support]), 
332         [
333             case "${enableval}" in
334                 yes) oss=yes ;;
335                 no) oss=no ;;
336                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
337             esac
338         ],
339         [oss=auto])
341 if test "x${oss}" != xno ; then
342     AC_CHECK_HEADERS([sys/soundcard.h],
343         [
344             HAVE_OSS=1
345             AC_DEFINE([HAVE_OSS], 1, [Have OSS?])
346         ],
347         [
348             HAVE_OSS=0
349             if test "x$oss" = xyes ; then
350                 AC_MSG_ERROR([*** OSS support not found])
351             fi
352         ])
353 else
354     HAVE_OSS=0
357 AC_SUBST(HAVE_OSS)
358 AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1])
361 #### ALSA support (optional) ####
363 AC_ARG_ENABLE([alsa], 
364     AC_HELP_STRING([--disable-alsa], [Disable optional ALSA support]), 
365         [
366             case "${enableval}" in
367                 yes) alsa=yes ;;
368                 no) alsa=no ;;
369                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-alsa) ;;
370             esac
371         ],
372         [alsa=auto])
374 if test "x${alsa}" != xno ; then
375     PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ],
376         [
377             HAVE_ALSA=1
378             AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])
379         ],
380         [
381             HAVE_ALSA=0
382             if test "x$alsa" = xyes ; then
383                 AC_MSG_ERROR([*** ALSA support not found])
384             fi
385         ])
386 else
387     HAVE_ALSA=0
390 AC_SUBST(ASOUNDLIB_CFLAGS)
391 AC_SUBST(ASOUNDLIB_LIBS) 
392 AC_SUBST(HAVE_ALSA)
393 AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1])
395 #### Solaris audio support (optional) ####
397 AC_ARG_ENABLE([solaris], 
398     AC_HELP_STRING([--disable-solaris], [Disable optional Solaris audio support]), 
399         [
400             case "${enableval}" in
401                 yes) solaris=yes ;;
402                 no) solaris=no ;;
403                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-solaris) ;;
404             esac
405         ],
406         [solaris=auto])
408 if test "x${solaris}" != xno ; then
409     AC_CHECK_HEADERS([sys/audio.h],
410         [
411             HAVE_SOLARIS=1
412             AC_DEFINE([HAVE_SOLARIS], 1, [Have Solaris audio?])
413         ],
414         [
415             HAVE_SOLARIS=0
416             if test "x$solaris" = xyes ; then
417                 AC_MSG_ERROR([*** Solaris audio support not found])
418             fi
419         ])
420 else
421     HAVE_SOLARIS=0
424 AC_SUBST(HAVE_SOLARIS)
425 AM_CONDITIONAL([HAVE_SOLARIS], [test "x$HAVE_SOLARIS" = x1])
427 #### GLib 2 support (optional) ####
429 AC_ARG_ENABLE([glib2], 
430     AC_HELP_STRING([--disable-glib2], [Disable optional GLib 2 support]), 
431         [
432             case "${enableval}" in
433                 yes) glib2=yes ;;
434                 no) glib2=no ;;
435                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-glib2) ;;
436             esac
437         ],
438         [glib2=auto])
440 if test "x${glib2}" != xno ; then
441     PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ],
442         HAVE_GLIB20=1,
443         [
444             HAVE_GLIB20=0
445             if test "x$glib2" = xyes ; then
446                 AC_MSG_ERROR([*** GLib 2 support not found])
447             fi
448         ])
449 else
450     HAVE_GLIB20=0
453 AC_SUBST(GLIB20_CFLAGS)
454 AC_SUBST(GLIB20_LIBS)
455 AC_SUBST(HAVE_GLIB20)
456 AM_CONDITIONAL([HAVE_GLIB20], [test "x$HAVE_GLIB20" = x1])
458 #### GConf support (optional) ####
460 AC_ARG_ENABLE([gconf], 
461     AC_HELP_STRING([--disable-gconf], [Disable optional GConf support]), 
462         [
463             case "${enableval}" in
464                 yes) gconf=yes ;;
465                 no) gconf=no ;;
466                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-gconf) ;;
467             esac
468         ],
469         [glib=auto])
471 if test "x${gconf}" != xno ; then
472     PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 ],
473         HAVE_GCONF=1,
474         [
475             HAVE_GCONF=0
476             if test "x$gconf" = xyes ; then
477                 AC_MSG_ERROR([*** GConf support not found])
478             fi
479         ])
480 else
481     HAVE_GCONF=0
484 AC_SUBST(GCONF_CFLAGS)
485 AC_SUBST(GCONF_LIBS)
486 AC_SUBST(HAVE_GCONF)
487 AM_CONDITIONAL([HAVE_GCONF], [test "x$HAVE_GCONF" = x1])
489 #### Avahi support (optional) ####
491 AC_ARG_ENABLE([avahi], 
492     AC_HELP_STRING([--disable-avahi], [Disable optional Avahi support]), 
493         [
494             case "${enableval}" in
495                 yes) avahi=yes ;;
496                 no) avahi=no ;;
497                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-avahi) ;;
498             esac
499         ],
500         [avahi=auto])
502 if test "x${avahi}" != xno ; then
503     PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.0 ],
504         HAVE_AVAHI=1,
505         [
506                 HAVE_AVAHI=0
507                 if test "x$avahi" = xyes ; then
508                         AC_MSG_ERROR([*** Avahi support not found])
509                 fi
510         ])
511 else
512     HAVE_AVAHI=0
515 AC_SUBST(AVAHI_CFLAGS)
516 AC_SUBST(AVAHI_LIBS)
517 AC_SUBST(HAVE_AVAHI)
518 AM_CONDITIONAL([HAVE_AVAHI], [test "x$HAVE_AVAHI" = x1])
520 ### LIBOIL ####
522 PKG_CHECK_MODULES(LIBOIL, [ liboil-0.3 >= 0.3.0 ])
523 AC_SUBST(LIBOIL_CFLAGS)
524 AC_SUBST(LIBOIL_LIBS)
526 ### JACK (optional) ####
528 AC_ARG_ENABLE([jack], 
529     AC_HELP_STRING([--disable-jack], [Disable optional JACK support]), 
530         [
531             case "${enableval}" in
532                 yes) jack=yes ;;
533                 no) jack=no ;;
534                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
535             esac
536         ],
537         [jack=auto])
539 if test "x${jack}" != xno ; then
540     PKG_CHECK_MODULES(JACK, [ jack >= 0.100 ],
541         HAVE_JACK=1,
542         [
543             HAVE_JACK=0
544             if test "x$jack" = xyes ; then
545                 AC_MSG_ERROR([*** JACK support not found])
546             fi
547         ])
548 else
549     HAVE_JACK=0
552 AC_SUBST(JACK_CFLAGS)
553 AC_SUBST(JACK_LIBS)
554 AC_SUBST(HAVE_JACK)
555 AM_CONDITIONAL([HAVE_JACK], [test "x$HAVE_JACK" = x1])
557 #### Async DNS support (optional) ####
559 AC_ARG_ENABLE([asyncns], 
560     AC_HELP_STRING([--disable-asyncns], [Disable optional Async DNS support]), 
561         [
562             case "${enableval}" in
563                 yes) asyncns=yes ;;
564                 no) asyncns=no ;;
565                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-asyncns) ;;
566             esac
567         ],
568         [asyncns=auto])
570 if test "x${asyncns}" != xno ; then
571     PKG_CHECK_MODULES(LIBASYNCNS, [ libasyncns >= 0.1 ],
572         HAVE_LIBASYNCNS=1,
573         [
574             HAVE_LIBASYNCNS=0
575             if test "x$asyncns" = xyes ; then
576                 AC_MSG_ERROR([*** Async DNS support not found])
577             fi
578         ])
579 else
580     HAVE_LIBASYNCNS=0
583 AC_SUBST(LIBASYNCNS_CFLAGS)
584 AC_SUBST(LIBASYNCNS_LIBS)
585 AC_SUBST(HAVE_LIBASYNCNS)
586 AM_CONDITIONAL([HAVE_LIBASYNCNS], [test "x$HAVE_LIBASYNCNS" = x1])
588 if test "x$HAVE_LIBASYNCNS" != "x0" ; then
589    AC_DEFINE([HAVE_LIBASYNCNS], 1, [Have libasyncns?])
592 #### TCP wrappers (optional) ####
594 AC_ARG_ENABLE([tcpwrap], 
595     AC_HELP_STRING([--disable-tcpwrap], [Disable optional TCP wrappers support]), 
596         [
597             case "${enableval}" in
598                 yes) tcpwrap=yes ;;
599                 no) tcpwrap=no ;;
600                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;;
601             esac
602         ],
603         [tcpwrap=auto])
605 if test "x${tcpwrap}" != xno ; then
606     ACX_LIBWRAP
607     if test "x${LIBWRAP_LIBS}" = x && test "x$tcpwrap" = xyes ; then
608         AC_MSG_ERROR([*** TCP wrappers support not found])
609     fi
610 else
611     LIBWRAP_LIBS=
614 AC_SUBST(LIBWRAP_LIBS)
616 #### LIRC support (optional) ####
618 AC_ARG_ENABLE([lirc], 
619     AC_HELP_STRING([--disable-lirc], [Disable optional LIRC support]), 
620         [
621             case "${enableval}" in
622                 yes) lirc=yes ;;
623                 no) lirc=no ;;
624                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-lirc) ;;
625             esac
626         ],
627         [lirc=auto])
629 if test "x${lirc}" != xno ; then
630     ACX_LIRC
631     if test "x${HAVE_LIRC}" = x0 && test "x$lirc" = xyes ; then
632         AC_MSG_ERROR([*** LIRC support not found])
633     fi
634 else
635     HAVE_LIRC=0
638 AC_SUBST(LIRC_CFLAGS)
639 AC_SUBST(LIRC_LIBS)
640 AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1])
642 #### HAL support (optional) ####
644 AC_ARG_ENABLE([hal], 
645     AC_HELP_STRING([--disable-hal], [Disable optional HAL support]), 
646         [
647             case "${enableval}" in
648                 yes) hal=yes ;;
649                 no) hal=no ;;
650                 *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal) ;;
651             esac
652         ],
653         [hal=auto])
655 if test "x${hal}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
656     PKG_CHECK_MODULES(HAL, [ hal >= 0.5.7 ],
657         HAVE_HAL=1,
658         [
659             HAVE_HAL=0
660             if test "x$hal" = xyes ; then
661                 AC_MSG_ERROR([*** HAL support not found])
662             fi
663         ])
664 else
665     HAVE_HAL=0
668 AC_SUBST(HAL_CFLAGS)
669 AC_SUBST(HAL_LIBS)
670 AC_SUBST(HAVE_HAL)
671 AM_CONDITIONAL([HAVE_HAL], [test "x$HAVE_HAL" = x1])
673 #### PulseAudio system group & user  #####
675 AC_ARG_WITH(system_user, AS_HELP_STRING([--with-system-user=<user>],[User for running the PulseAudio daemon as a system-wide instance (pulse)]))
676 if test -z "$with_system_user" ; then
677     PA_SYSTEM_USER=pulse
678 else
679     PA_SYSTEM_USER=$with_system_user
681 AC_SUBST(PA_SYSTEM_USER)
682 AC_DEFINE_UNQUOTED(PA_SYSTEM_USER,"$PA_SYSTEM_USER", [User for running the PulseAudio system daemon])
684 AC_ARG_WITH(system_group,AS_HELP_STRING([--with-system-group=<group>],[Group for running the PulseAudio daemon as a system-wide instance (pulse)]))
685 if test -z "$with_system_group" ; then
686     PA_SYSTEM_GROUP=pulse
687 else
688     PA_SYSTEM_GROUP=$with_system_group
690 AC_SUBST(PA_SYSTEM_GROUP)
691 AC_DEFINE_UNQUOTED(PA_SYSTEM_GROUP,"$PA_SYSTEM_GROUP", [Group for the PulseAudio system daemon])
693 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)]))
694 if test -z "$with_realtime_group" ; then
695     PA_REALTIME_GROUP=realtime
696 else
697     PA_REALTIME_GROUP=$with_realtime_group
699 AC_SUBST(PA_REALTIME_GROUP)
700 AC_DEFINE_UNQUOTED(PA_REALTIME_GROUP,"$PA_REALTIME_GROUP", [Realtime group])
702 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)]))
703 if test -z "$with_access_group" ; then
704     PA_ACCESS_GROUP=pulse-access
705 else
706     PA_ACCESS_GROUP=$with_access_group
708 AC_SUBST(PA_ACCESS_GROUP)
709 AC_DEFINE_UNQUOTED(PA_ACCESS_GROUP,"$PA_ACCESS_GROUP", [Access group])
711 #### PulseAudio system runtime dir ####
712 PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
713 AC_SUBST(PA_SYSTEM_RUNTIME_PATH)
715 ###################################
716 #            Output               #
717 ###################################
719 AC_ARG_ENABLE(
720         [static-bins],
721         AC_HELP_STRING([--enable-static-bins],[Statically link executables.]),
722         [STATIC_BINS=1], [STATIC_BINS=0])
723 AM_CONDITIONAL([STATIC_BINS], [test "x$STATIC_BINS" = "x1"])
725 AC_ARG_WITH(
726         [preopen-mods],
727         AC_HELP_STRING([--with-preopen-mods],[Modules to preopen in daemon (default: all).]),
728         [PREOPEN_MODS=$withval], [PREOPEN_MODS="all"])
729 AM_CONDITIONAL([PREOPEN_MODS], [test "x$PREOPEN_MODS" != "xall"])
730 if test "x$PREOPEN_MODS" != "xall" ; then
731     tmpLIBS=""
732     for mod in $PREOPEN_MODS; do
733         tmpLIBS="$tmpLIBS module-$mod.la"
734     done
735     PREOPEN_MODS="$tmpLIBS"
736     AC_SUBST(PREOPEN_MODS)
739 AC_ARG_WITH(
740         [module-dir],
741         AC_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules/]),
742         [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules/"])
744 AC_SUBST(modlibexecdir)
746 AC_ARG_ENABLE(
747         [force-preopen],
748         AC_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]),
749         [FORCE_PREOPEN=1], [FORCE_PREOPEN=0])
750 AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "x1"])
752 AC_CONFIG_FILES([
753 Makefile
754 src/Makefile
755 libpulse.pc
756 libpulse-simple.pc
757 libpulse-browse.pc
758 libpulse-mainloop-glib.pc
759 doxygen/Makefile
760 doxygen/doxygen.conf
761 src/pulse/version.h
763 AC_OUTPUT
765 # ==========================================================================
766 ENABLE_X11=no
767 if test "x$HAVE_X11" = "x1" ; then
768    ENABLE_X11=yes
771 ENABLE_OSS=no
772 if test "x$HAVE_OSS" = "x1" ; then
773    ENABLE_OSS=yes
776 ENABLE_ALSA=no
777 if test "x$HAVE_ALSA" = "x1" ; then
778    ENABLE_ALSA=yes
781 ENABLE_SOLARIS=no
782 if test "x$HAVE_SOLARIS" = "x1" ; then
783    ENABLE_SOLARIS=yes
786 ENABLE_GLIB20=no
787 if test "x$HAVE_GLIB20" = "x1" ; then
788    ENABLE_GLIB20=yes
791 ENABLE_GCONF=no
792 if test "x$HAVE_GCONF" = "x1" ; then
793    ENABLE_GCONF=yes
796 ENABLE_AVAHI=no
797 if test "x$HAVE_AVAHI" = "x1" ; then
798    ENABLE_AVAHI=yes
801 ENABLE_JACK=no
802 if test "x$HAVE_JACK" = "x1" ; then
803    ENABLE_JACK=yes
806 ENABLE_LIBASYNCNS=no
807 if test "x$HAVE_LIBASYNCNS" = "x1" ; then
808    ENABLE_LIBASYNCNS=yes
811 ENABLE_LIRC=no
812 if test "x$HAVE_LIRC" = "x1" ; then
813    ENABLE_LIRC=yes
816 ENABLE_HAL=no
817 if test "x$HAVE_HAL" = "x1" ; then
818    ENABLE_HAL=yes
821 ENABLE_TCPWRAP=no
822 if test "x${LIBWRAP_LIBS}" != x ; then
823    ENABLE_TCPWRAP=yes
826 echo "
827  ---{ $PACKAGE_NAME $VERSION }---
829     prefix:                 ${prefix}
830     sysconfdir:             ${sysconfdir}
831     localstatedir:          ${localstatedir}
832     System Runtime Path:    ${PA_SYSTEM_RUNTIME_PATH}
833     Compiler:               ${CC}
834     CFLAGS:                 ${CFLAGS}
835     Have X11:               ${ENABLE_X11}
836     Enable OSS:             ${ENABLE_OSS}
837     Enable Alsa:            ${ENABLE_ALSA}
838     Enable Solaris:         ${ENABLE_SOLARIS}
839     Enable GLib 2.0:        ${ENABLE_GLIB20}
840     Enable GConf:           ${ENABLE_GCONF}
841     Enable Avahi:           ${ENABLE_AVAHI}
842     Enable Jack:            ${ENABLE_JACK}
843     Enable Async DNS:       ${ENABLE_LIBASYNCNS}
844     Enable LIRC:            ${ENABLE_LIRC}
845     Enable HAL:             ${ENABLE_HAL}
846     Enable TCP Wrappers:    ${ENABLE_TCPWRAP}
847     System User:            ${PA_SYSTEM_USER}
848     System Group:           ${PA_SYSTEM_GROUP}
849     Realtime Group:         ${PA_REALTIME_GROUP}
850     Access Group:           ${PA_ACCESS_GROUP}