1 dnl Process this file with autoconf to produce a configure script.
6 AC_CONFIG_AUX_DIR(config)
10 dnl HOWTO: updating the JACK version number
12 dnl major version = ask on jackit-devel :)
13 dnl minor version = incremented when any of the public or internal
14 dnl interfaces are changed
15 dnl micro version = incremented when implementation-only
19 JACK_MINOR_VERSION=116
23 dnl HOWTO: updating the jack protocol version
25 dnl increment the protocol version whenever a change is
26 dnl made to the way libjack communicates with jackd
27 dnl that would break applications statically linked with an older
28 dnl version of libjack. NOTE: statically linking to libjack
29 dnl is a huge mistake.
31 JACK_PROTOCOL_VERSION=24
34 dnl HOWTO: updating the libjack interface version
36 dnl current = incremented whenever the public libjack API is changed
37 dnl revision = incremented when the libjack implementation is changed
38 dnl age = current libjack is both source and binary compatible with
39 dnl libjack interfaces current,current-1,...,current-age
41 dnl Note! see libtool documentation for detailed documentation
43 dnl Note Also! until we reach CURRENT>=1, the rules are somewhat
44 dnl slacker than this, and closer to those for the JACK version
51 AC_SUBST(JACK_MAJOR_VERSION)
52 AC_SUBST(JACK_MINOR_VERSION)
53 AC_SUBST(JACK_MICRO_VERSION)
55 AC_SUBST(JACK_PROTOCOL_VERSION)
56 AC_DEFINE_UNQUOTED(PROTOCOL_VERSION, "$JACK_PROTOCOL_VERSION", [Protocol version])
58 AC_SUBST(JACK_API_MAJOR_VERSION)
59 AC_SUBST(JACK_API_MINOR_VERSION)
60 AC_SUBST(JACK_API_MICRO_VERSION)
62 JACK_SO_VERSION=${JACK_API_CURRENT}:${JACK_API_REVISION}:${JACK_API_AGE}
64 JACK_VERSION=$JACK_MAJOR_VERSION.$JACK_MINOR_VERSION.${JACK_MICRO_VERSION}${BETA}
65 JACK_RELEASE=$JACK_MAJOR_VERSION-$JACK_MINOR_VERSION-${JACK_MICRO_VERSION}${BETA}
67 AC_SUBST(JACK_SO_VERSION)
68 AC_SUBST(JACK_VERSION)
69 AC_SUBST(JACK_RELEASE)
71 AM_INIT_AUTOMAKE(jack-audio-connection-kit,${JACK_VERSION})
75 dnl save any user-provided CFLAGS so we can forget
76 dnl about any nonsense that configure generates
79 ORIGINAL_CFLAGS="$CFLAGS"
81 AM_CONFIG_HEADER(config.h)
93 dnl now use those user-provided CFLAGS
94 dnl and dump whatever nonsense configure generated
95 dnl while looking for a compiler
98 CFLAGS="$ORIGINAL_CFLAGS"
100 AC_MSG_CHECKING([platform dependencies])
102 HOST_DEFAULT_TMP_DIR=/dev/shm
105 # current FreeBSD header files conflict with the OSS driver's
106 # barrier code, this may be fixed in 5.3, stay tuned.
110 # pthread_barrier* not implemented
112 # need small realtime stack
113 JACK_THREAD_STACK_TOUCH=10000
116 JACK_THREAD_STACK_TOUCH=10000 # need small realtime stack
117 JACK_CPP_VARARGS_BROKEN=1
119 JACK_USE_MACH_THREADS=1
120 OS_LDFLAGS="-framework CoreAudio -framework CoreServices -framework AudioUnit"
121 TRY_POSIX_SHM=yes # POSIX shm works better
122 HOST_DEFAULT_TMP_DIR=/tmp
129 # We need to establish suitable defaults for a 64-bit OS
133 case "${host_cpu}" in
134 x86_64|mips64|ppc64|sparc64|s390x)
140 ## libnn=lib/sparcv9 ## on 64-bit only, but that's compiler-specific
144 ## take care not to override the command-line setting
145 if test "${libdir}" = '${exec_prefix}/lib'; then
146 libdir='${exec_prefix}/'${libnn}
149 # system-dependent config.h values
150 test "x$JACK_THREAD_STACK_TOUCH" = "x" && JACK_THREAD_STACK_TOUCH=500000
151 AC_DEFINE_UNQUOTED(JACK_THREAD_STACK_TOUCH,
152 [$JACK_THREAD_STACK_TOUCH],
153 [Guaranteed size of realtime stack])
154 if test "x$JACK_CPP_VARARGS_BROKEN" != "x"; then
155 AC_DEFINE_UNQUOTED(JACK_CPP_VARARGS_BROKEN,
156 [$JACK_CPP_VARARGS_BROKEN],
157 [CPP has a broken varargs implementation])
159 if test "x$JACK_USE_MACH_THREADS" != "x"; then
160 AC_DEFINE_UNQUOTED(JACK_USE_MACH_THREADS,
161 [$JACK_USE_MACH_THREADS],
162 [Use MACH threads where possible])
166 AC_CHECK_HEADERS(string.h strings.h alloca.h)
167 AC_CHECK_HEADERS(getopt.h, [], [
168 for d in /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/ ; do
169 AC_CHECK_HEADERS($d/getopt.h, [], [CFLAGS="$CFLAGS -I$d"])
171 AC_CHECK_HEADER(/usr/include/nptl/pthread.h,
172 [CFLAGS="$CFLAGS -I/usr/include/nptl"])
174 # functions and libraries
175 AC_CHECK_FUNC(getopt_long, [],
176 AC_MSG_ERROR([*** JACK requires GNU getopt_long]))
177 AC_CHECK_FUNC(gethostent, [], AC_CHECK_LIB(nsl, gethostent))
178 AC_CHECK_FUNC(setsockopt, [], AC_CHECK_LIB(socket, setsockopt))
179 AC_CHECK_FUNC(connect, [], AC_CHECK_LIB(inet, connect))
180 AC_CHECK_FUNC(dlopen, [],
181 AC_CHECK_LIB(dl, dlopen, [],
182 AC_MSG_ERROR([*** JACK requires dynamic load support])))
183 AC_CHECK_FUNC(pthread_create, [],
184 AC_CHECK_LIB(pthread, pthread_create, [],
185 AC_MSG_ERROR([*** JACK requires POSIX threads support])))
186 AC_CHECK_FUNCS(on_exit atexit)
187 AC_CHECK_FUNCS(posix_memalign)
190 echo -n "Checking for ppoll()... "
196 AC_DEFINE(HAVE_PPOLL,1,"Whether ppoll is available")
199 AC_DEFINE(HAVE_PPOLL,0,"Whether ppoll is available")
205 AC_CHECK_FUNC(clock_gettime,
207 AC_DEFINE(HAVE_CLOCK_GETTIME,0,"Whether or not clock_gettime can be found in system libraries")
210 # if not found, check librt specifically
212 AC_CHECK_LIB(rt, clock_gettime,
214 AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries")
215 OS_LDFLAGS="$OS_LDFLAGS -lrt"
219 # should we use mlockall() on this platform?
220 if test "x$JACK_DO_NOT_MLOCK" = "x"; then
221 AC_CHECK_HEADER(sys/mman.h,
222 [AC_CHECK_FUNC(mlockall,
223 [AC_DEFINE(USE_MLOCK, 1, [Use POSIX memory locking])])])
226 # look for system support for POSIX shm API
227 AC_ARG_ENABLE(posix-shm,
228 AC_HELP_STRING([--enable-posix-shm], [use POSIX shm API (default=auto)]),
229 [TRY_POSIX_SHM=$enableval])
230 if test "x$TRY_POSIX_SHM" = "xyes"
232 AC_CHECK_FUNC(shm_open, [],
233 AC_CHECK_LIB(rt, shm_open, [], [TRY_POSIX_SHM=no]))
235 AC_MSG_CHECKING([shared memory support])
236 if test "x$TRY_POSIX_SHM" = "xyes"
238 AC_MSG_RESULT([POSIX shm_open().])
239 AC_DEFINE(USE_POSIX_SHM,1,[Use POSIX shared memory interface])
240 JACK_SHM_TYPE='"POSIX"'
243 AC_MSG_RESULT([System V shmget().])
244 JACK_SHM_TYPE='"System V"'
245 USE_POSIX_SHM="false"
247 AC_DEFINE_UNQUOTED(JACK_SHM_TYPE, [$JACK_SHM_TYPE],
248 [JACK shared memory type])
249 AM_CONDITIONAL(USE_POSIX_SHM, $USE_POSIX_SHM)
251 JACK_CORE_CFLAGS="-I\$(top_srcdir)/config -I\$(top_srcdir) \
252 -I\$(top_srcdir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall"
254 JACK_LIBC_HELPER_FLAGS=
255 AC_ARG_ENABLE(ancient_libc,
256 AC_HELP_STRING([--enable-ancient-libc],[Add required CFLAGS for libc versions too old to expose PThread R/W Lock and other modern code]),
257 JACK_LIBC_HELPER_FLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE",
258 JACK_LIBC_HELPER_FLAGS=""
261 JACK_CORE_CFLAGS="$JACK_CORE_CFLAGS $JACK_LIBC_HELPER_FLAGS"
263 AC_ARG_WITH(cpu-target,
264 [ --with-cpu-target=cpu-type explicit, overriding argument for gcc -march= flag])
268 dnl figure out how best to optimize
269 dnl JOQ: this should be done via config/configure.hosts
272 dnl ----------------------------------------------------------------------
274 if test "$target_cpu" = "powerpc64" ; then
277 AC_HELP_STRING([--enable-cell],[enable Cell BE support (default=no)]),,
280 if test "x$enable_cell" = xyes; then
281 AC_DEFINE(ENABLE_CELLBE, 1, [Define to 1 if you need support for the Cell BE.])
286 if test "$target_cpu" = "powerpc" -o "$target_cpu" = "powerpc64" ; then
288 AC_DEFINE(POWERPC, 1, "Are we running a ppc CPU?")
290 ############################
291 # Check for Altivec assembly
292 ############################
294 AC_ARG_ENABLE(altivec,
295 AC_HELP_STRING([--enable-altivec],[enable Altivec support (default=auto)]),,
296 [ enable_altivec=yes ])
298 if test "x$enable_altivec" = xyes; then
300 AC_MSG_CHECKING(whether we can compile Altivec code)
302 AC_COMPILE_IFELSE([asm ("vand %v0, %v0, %v0");],
303 AC_DEFINE(USE_ALTIVEC, 1, [Define to 1 if Altivec assembly is available.])
304 AC_DEFINE(HAVE_ALTIVEC_LINUX, 1, "Is there Altivec Support ?")
305 ALTIVEC_OPT_FLAGS="-maltivec -mabi=altivec"
310 AC_MSG_WARN([The assembler does not support the Altivec command set.])
315 dnl -mcpu=7450 does not reliably work with gcc 3.*
317 JACK_OPT_CFLAGS="-O2 -mcpu=7400 $ALTIVEC_OPT_FLAGS -mhard-float -mpowerpc-gfxopt"
319 if test "$target_cpu" = "powerpc64"; then
320 JACK_OPT_CFLAGS="-O2 -mcpu=powerpc64 $ALTIVEC_OPT_FLAGS -mhard-float"
323 elif echo $target_cpu | egrep '(i.86|x86_64)' >/dev/null; then
325 dnl Check for MMX/SSE assembly
327 if test -r /proc/cpuinfo ; then
328 procflags=`grep '^flags' /proc/cpuinfo`
329 if echo $procflags | grep -s mmx ; then
332 if echo $procflags | grep -s sse ; then
336 # this is not linux, but assume that if the processor
337 # is x86 then is supports SSE and not MMX
339 AC_MSG_WARN([Assuming your x86/x86_64 system can support SSE. Use --disable-sse if this is not the case])
341 AC_MSG_WARN([Assuming your x86/x86_64 system does not need to use MMX. Use --enable-mmx if this is not the case])
344 AC_ARG_ENABLE(optimization-by-compiler,
345 AC_HELP_STRING([--enable-optimization-by-compiler],[use compiler (NOT processor) capabilities to determine optimization flags (default=no)]),
346 optimization_by_compiler=yes,
347 optimization_by_compiler=no
350 AC_ARG_ENABLE(optimization-by-cpu,
351 AC_HELP_STRING([--enable-optimization-by-cpu],[use processor capabilities to determine optimization flags (default=yes)]),,
352 optimization_by_cpu=yes
356 AC_HELP_STRING([--enable-mmx],[enable MMX support (default=auto)]),,
360 AC_HELP_STRING([--enable-sse],[enable SSE support (default=auto)]),,
361 enable_sse=$enable_mmx)
363 if test "x$enable_mmx" = xyes; then
365 AC_MSG_CHECKING(whether we can compile MMX code)
367 AC_COMPILE_IFELSE([asm ("movq 0, %mm0");],
369 AC_DEFINE(USE_MMX, 1, [Define to 1 if MMX assembly is available.])
372 if test x$optimization_by_cpu = xyes ; then
373 if test x$cpu_supports_mmx = xyes ; then
384 AC_MSG_WARN([The assembler does not support the MMX command set.])
388 if test "x$enable_sse" = xyes; then
390 AC_MSG_CHECKING(whether we can compile SSE code)
392 AC_COMPILE_IFELSE([asm ("movntps %xmm0, 0");],
394 if test x$optimization_by_cpu = xyes ; then
395 if test x$cpu_supports_sse = xyes ; then
396 SSE_FLAGS="-msse -mfpmath=sse"
400 SSE_FLAGS="-msse -mfpmath=sse"
409 AC_MSG_WARN([The assembler does not support the SSE command set.])
413 AC_DEFINE(x86, 1, "Nope it's intel")
414 COMMON_X86_OPT_FLAGS="-O3 -fomit-frame-pointer -ffast-math -funroll-loops"
417 dnl its a little sad that OS X doesn't make it possible to identify
418 dnl the target_cpu a little more precisely. on os x we always get "i386"
419 dnl as the CPU type. we miss out on some possible optimizations as
420 dnl a result. oh well.
423 if test x$with_cpu_target != x ; then
424 JACK_OPT_CFLAGS="-march=$with_cpu_target"
426 if test "$target_cpu" = "i586"; then
427 JACK_OPT_CFLAGS="-march=i586 "
428 elif test "$target_cpu" = "i686"; then
429 JACK_OPT_CFLAGS="-march=i686"
430 elif test "$target_cpu" = "x86_64"; then
431 JACK_OPT_CFLAGS="-march=k8"
438 dnl do not add h/w specific flags if asked to let compiler
439 dnl to the optimization
442 if test x$optimization_by_compiler != xyes ; then
443 JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS $JACK_OPT_CFLAGS $MMX_FLAGS $SSE_FLAGS"
445 JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS"
450 AC_ARG_ENABLE(dynsimd,
451 AC_HELP_STRING([--enable-dynsimd],[enable dynamic SIMD selection (default=no)]),,
454 if test "x$enable_dynsimd" = xyes; then
455 AC_DEFINE(USE_DYNSIMD, 1, [Define to 1 to use dynamic SIMD selection.])
456 dnl This needs update once there's more than x86/x86-64 supported
457 SIMD_CFLAGS="-O -msse -msse2 -m3dnow"
458 AC_SUBST(SIMD_CFLAGS)
461 AC_ARG_ENABLE(optimize,
462 AC_HELP_STRING([--enable-optimize],
463 [optimize code, based on CPU or compiler, as separately selected (default=no)]),
464 [ if test x$enable_optimize != xno ; then
465 AC_MSG_WARN([optimization in use.........................])
467 # no optimization, so lets get debugging symbols instead
469 AC_MSG_WARN([no optimization.........................])
473 # no optimization, so lets get debugging symbols instead
475 AC_MSG_WARN([no optimization.........................])
479 JACK_CFLAGS="$JACK_CORE_CFLAGS $JACK_OPT_CFLAGS"
482 dnl most makefiles use JACK_CFLAGS, but simd code needs JACK_CORE_CFLAGS
485 AC_SUBST(JACK_CFLAGS)
486 AC_SUBST(JACK_CORE_CFLAGS)
489 dnl use JACK_CFLAGS for jackd compilation
492 CFLAGS="$CFLAGS $JACK_CFLAGS"
494 # allow buffer resizing unless --disable-resize specified
496 AC_ARG_ENABLE(resize,
497 AC_HELP_STRING([--enable-resize], [enable buffer resizing feature (default=yes)]),
499 if test x$enable_resize = xno ; then
505 if test x$buffer_resizing != xno; then
506 AC_DEFINE(DO_BUFFER_RESIZE,,[Enable buffer resizing])
510 AC_ARG_ENABLE(ensure-mlock,
511 AC_HELP_STRING([--enable-ensure-mlock], [server should fail if unable to lock memory (default=no)]),
513 if test x$enable_ensure_mlock != xno ; then
514 AC_DEFINE(ENSURE_MLOCK,,[Ensure that memory locking succeeds])
520 AC_HELP_STRING([--enable-debug],
521 [enable debugging messages in jackd and libjack (default=no)]),
523 if test x$enable_debug != xno ; then
524 AC_DEFINE(DEBUG_ENABLED,,[Enable debugging messages])
529 AC_ARG_ENABLE(timestamps,
530 AC_HELP_STRING([--enable-timestamps],
531 [allow clients to use the JACK timestamp API (JACK developers only) (default=no)]),
533 if test x$enable_timestamps != xno ; then
534 AC_DEFINE(WITH_TIMESTAMPS,,[Enable JACK timestamp API])
539 AC_ARG_ENABLE(preemption-check,
540 AC_HELP_STRING([--enable-preemption-check],
541 [check for inappropriate realtime preemption (requires a specially built Linux kernel) (default=no)]),
543 if test x$enable_preemption_check != xno ; then
544 echo checking for realtime preemption bugs
545 AC_DEFINE(DO_PREEMPTION_CHECKING,,
546 [check realtime preemption])
550 USE_CAPABILITIES=false
552 AC_ARG_ENABLE(capabilities,
553 AC_HELP_STRING([--enable-capabilities],[!!! LINUX 2.4 KERNELS ONLY !!! use libcap to gain realtime scheduling priviledges]),
554 [ if test "x$enable_capabilities" != "xno" ; then
555 AC_CHECK_LIB(cap, capgetp,
556 [AC_CHECK_HEADER(sys/capability.h,
557 [HAVE_CAPABILITIES=true],
558 [AC_MSG_WARN([*** no kernel support for capabilities])
559 HAVE_CAPABILITIES=false]
561 [AC_MSG_WARN([*** no libcap present])
562 HAVE_CAPABILITIES=false]
564 if test "x$HAVE_CAPABILITIES" = "xtrue"; then
565 AC_CHECK_PROG(HAVE_CAPABILITIES, md5sum, true, false)
567 if test "x$HAVE_CAPABILITIES" = "xfalse"; then
568 AC_MSG_WARN([*** required program md5sum not found])
570 if test "x$HAVE_CAPABILITIES" = "xfalse"; then
571 AC_MSG_ERROR([*** Capabilities support not present. Run configure again without --enable-capabilities.])
573 USE_CAPABILITIES=true
574 AC_DEFINE(USE_CAPABILITIES,,[Enable POSIX 1.e capabilities support])
580 AC_ARG_ENABLE(oldtrans,
581 AC_HELP_STRING([--disable-oldtrans],[remove old transport interfaces (default=yes)]),
582 [ if test "x$enable_oldtrans" = "xno" ; then
587 if test "x$with_oldtrans" != "xno" ; then
588 AC_DEFINE(OLD_TRANSPORT,,[Include old transport interfaces])
592 AC_ARG_ENABLE(stripped-jackd,
593 AC_HELP_STRING([--enable-stripped-jackd],[strip jack before computing its md5 sum (useful only with Linux 2.4 kernel)]),
594 [ if test "x$USE_CAPABILITIES" != "xtrue" ; then
595 AC_MSG_WARN([*** capabilities not enabled, stripped jackd has no effect])
596 elif test "x$enable_stripped_jackd" != "xno"; then
602 # plugins go in the addon dir.
604 ADDON_DIR='${libdir}/jack'
606 AS_AC_EXPAND(ADDON_DIR_EXPANDED,${libdir}/jack)
607 AC_DEFINE_UNQUOTED(ADDON_DIR,"$ADDON_DIR_EXPANDED",[Directory for plugins])
609 AC_ARG_WITH(html-dir,
610 AC_HELP_STRING([--with-html-dir=PATH],[where to install the html documentation]))
612 if test "x$with_html_dir" = "x" ; then
613 HTML_DIR='${pkgdatadir}'
615 HTML_DIR=$with_html_dir
621 # allow specifying default tmpdir
622 AC_ARG_WITH(default-tmpdir,
623 AC_HELP_STRING([--with-default-tmpdir],[where jackd and clients will put tmp files (default=/dev/shm)]))
625 if test "x$with_default_tmpdir" = "x" ; then
626 DEFAULT_TMP_DIR=$HOST_DEFAULT_TMP_DIR
628 DEFAULT_TMP_DIR=$with_default_tmpdir
631 AC_SUBST(DEFAULT_TMP_DIR)
632 AC_DEFINE_UNQUOTED(DEFAULT_TMP_DIR,"$DEFAULT_TMP_DIR",[Default tmp directory])
634 # Check for barrier functions in the pthreads library. The default
635 # option setting may be OS-dependent, otherwise it's "yes".
636 test "x$USE_BARRIER" = "x" && USE_BARRIER="yes"
638 AC_HELP_STRING([--without-barrier],
639 [avoid using pthread barrier functions (only used by OSS driver)]),
640 [ USE_BARRIER=$withval ])
641 if test "x$USE_BARRIER" = "xyes"; then
642 AC_CHECK_LIB([pthread], [pthread_barrier_init],
643 AC_DEFINE(USE_BARRIER, 1, [Use pthread barrier functions]))
646 # some example-clients need libsndfile
648 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0,[HAVE_SNDFILE=true], [true])
649 if test x$HAVE_SNDFILE = xfalse; then
650 AC_MSG_WARN([*** the jackrec example client will not be built])
653 # NetJack backend and internal client need libsamplerate
654 HAVE_SAMPLERATE=false
655 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.1.2,[HAVE_SAMPLERATE=true], [true])
656 if test x$HAVE_SAMPLERATE = xfalse; then
657 AC_MSG_WARN([*** the NetJack backend and internal client will not be built])
658 AC_DEFINE(HAVE_SAMPLERATE,0,"Whether libsamplerate is available")
660 CFLAGS="$CFLAGS $SAMPLERATE_CFLAGS"
661 LIBS="$LIBS $SAMPLERATE_LIBS"
662 AC_DEFINE(HAVE_SAMPLERATE,1,"Whether libsamplerate is available")
665 # Celt low-latency audio codec. netjack transmission via internet.
667 PKG_CHECK_MODULES(CELT, celt >= 0.5.0,[HAVE_CELT=true], [true])
668 if test x$HAVE_CELT = xfalse; then
669 AC_DEFINE(HAVE_CELT,0,"Whether CELT is available")
671 AC_MSG_WARN([*** NetJack will not be built with celt support])
673 AC_DEFINE(HAVE_CELT,1,"Whether CELT is available")
675 LIBS="$LIBS $CELT_LIBS"
678 # Note: A bug in pkg-config causes problems if the first occurence of
679 # PKG_CHECK_MODULES can be disabled. So, if you're going to use
680 # PKG_CHECK_MODULES inside a --disable-whatever check, you need to
681 # do it somewhere *below* this comment.
683 # Check which backend drivers can be built. The last one successfully
684 # configured becomes the default JACK driver; so the order of
685 # precedence is: alsa, sun, oss, coreaudio, portaudio, dummy.
687 JACK_DEFAULT_DRIVER=\"dummy\"
689 AC_ARG_ENABLE(portaudio,
690 AC_HELP_STRING([--enable-portaudio],[build PortAudio driver]),
691 TRY_PORTAUDIO=$enableval , TRY_PORTAUDIO=no)
694 if test "x$TRY_PORTAUDIO" = "xyes"
696 # check for portaudio V18
697 AC_CHECK_LIB(portaudio, Pa_Initialize,
698 [ AC_CHECK_HEADERS(portaudio.h,
701 JACK_DEFAULT_DRIVER=\"portaudio\"
706 AM_CONDITIONAL(HAVE_PA, $HAVE_PA)
708 AC_ARG_ENABLE(coreaudio, AC_HELP_STRING([--disable-coreaudio], [ignore CoreAudio driver]),
709 TRY_COREAUDIO=$enableval , TRY_COREAUDIO=yes )
710 HAVE_COREAUDIO="false"
711 if test "x$TRY_COREAUDIO" = "xyes"
713 # check for coreaudio
714 AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
715 [ HAVE_COREAUDIO="true"
716 JACK_DEFAULT_DRIVER=\"coreaudio\"
719 AM_CONDITIONAL(HAVE_COREAUDIO, $HAVE_COREAUDIO)
721 AC_ARG_ENABLE(oss, AC_HELP_STRING([--disable-oss],[ignore OSS driver ]),
722 TRY_OSS=$enableval , TRY_OSS=yes )
724 if test "x$TRY_OSS" = "xyes"
726 # check for Open Sound System
727 AC_CHECK_HEADER([sys/soundcard.h],
729 JACK_DEFAULT_DRIVER=\"oss\"])
731 AM_CONDITIONAL(HAVE_OSS, $HAVE_OSS)
733 AC_ARG_ENABLE(sun, AC_HELP_STRING([--disable-sun],[ignore Sun driver ]),
734 TRY_SUN=$enableval , TRY_SUN=yes )
736 if test "x$TRY_SUN" = "xyes"
738 # check for Sun audio API
739 AC_CHECK_HEADER([sys/audioio.h],
741 JACK_DEFAULT_DRIVER=\"sun\"])
743 AM_CONDITIONAL(HAVE_SUN, $HAVE_SUN)
745 AC_ARG_ENABLE(freebob, AC_HELP_STRING([--disable-freebob],[ignore FreeBob driver ]),
746 TRY_FREEBOB=$enableval , TRY_FREEBOB=yes )
748 if test "x$TRY_FREEBOB" = "xyes"
750 # check for FreeBob libraries
751 PKG_CHECK_MODULES(LIBFREEBOB, libfreebob >= 1.0.0,
753 JACK_DEFAULT_DRIVER=\"freebob\"
754 ], AC_MSG_RESULT([no]))
756 AC_SUBST([LIBFREEBOB_CFLAGS])
757 AC_SUBST([LIBFREEBOB_LIBS])
760 AM_CONDITIONAL(HAVE_FREEBOB,$HAVE_FREEBOB)
762 AC_ARG_ENABLE(firewire, AC_HELP_STRING([--disable-firewire],[ignore FireWire driver (FFADO)]),
763 TRY_FIREWIRE=$enableval , TRY_FIREWIRE=yes )
764 HAVE_FIREWIRE="false"
765 if test "x$TRY_FIREWIRE" = "xyes"
767 # check for FFADO libraries
768 PKG_CHECK_MODULES(LIBFFADO, libffado >= 1.999.17,
769 [HAVE_FIREWIRE="true"
770 JACK_DEFAULT_DRIVER=\"firewire\"
771 ], AC_MSG_RESULT([no]))
773 AC_SUBST([LIBFFADO_CFLAGS])
774 AC_SUBST([LIBFFADO_LIBS])
777 AM_CONDITIONAL(HAVE_FIREWIRE,$HAVE_FIREWIRE)
779 AC_ARG_ENABLE(alsa, AC_HELP_STRING([--disable-alsa],[ignore ALSA driver ]),
780 TRY_ALSA=$enableval , TRY_ALSA=yes )
782 if test "x$TRY_ALSA" = "xyes"
784 # check for ALSA >= 1.0.0
785 PKG_CHECK_MODULES(ALSA, alsa >= 1.0.0,
788 JACK_DEFAULT_DRIVER=\"alsa\"
789 ], AC_MSG_RESULT([no]), [-lm]
793 AM_CONDITIONAL(HAVE_ALSA, $HAVE_ALSA)
795 HAVE_ALSA_MIDI=$HAVE_ALSA
796 AM_CONDITIONAL(HAVE_ALSA_MIDI, $HAVE_ALSA_MIDI)
798 if test "$JACK_DEFAULT_DRIVER" = \"dummy\"; then
799 AC_MSG_WARN([Only the dummy driver can be built])
801 AC_DEFINE_UNQUOTED(JACK_DEFAULT_DRIVER,
802 [$JACK_DEFAULT_DRIVER],
803 [Default JACK driver])
805 JACK_SEMAPHORE_KEY=0x282929
806 AC_DEFINE_UNQUOTED(JACK_SEMAPHORE_KEY,
807 [$JACK_SEMAPHORE_KEY],
808 [ an integer constant used as the semaphore and SysV SHM key. see libjack/shm.c for usage])
809 AC_SUBST(JACK_SEMAPHORE_KEY)
811 # On some systems, readline depends on termcap or ncurses. But, the
812 # MacOSX linker complains bitterly if these libraries are explicitly
815 # AC_CHECK_LIB() foolishly assumes that checking a library for an entry
816 # point always returns the same result regardless of any dependent
817 # libraries specified. The `unset ac_cv_lib_readline_readline' erases
818 # the cached result to work around this problem.
821 AC_CHECK_LIB(readline, readline, [:],
822 [unset ac_cv_lib_readline_readline
823 AC_CHECK_LIB(readline, readline, [READLINE_DEPS="-ltermcap"],
824 [unset ac_cv_lib_readline_readline
825 AC_CHECK_LIB(readline, readline,
826 [READLINE_DEPS="-lncurses"], [HAVE_READLINE=false], "-lncurses")],
828 AC_CHECK_HEADER(readline/chardefs.h, [], [HAVE_READLINE=false])
829 if test x$HAVE_READLINE = xfalse; then
830 AC_MSG_WARN([*** the jack_transport example client will not be built])
832 AC_SUBST(READLINE_DEPS)
834 # you need doxygen to make dist.
835 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
836 if test $HAVE_DOXYGEN = "false"; then
837 AC_MSG_WARN([*** doxygen not found, docs will not be built])
840 AM_CONDITIONAL(HAVE_SNDFILE, $HAVE_SNDFILE)
841 AM_CONDITIONAL(HAVE_CELT, $HAVE_CELT)
842 AM_CONDITIONAL(HAVE_SAMPLERATE, $HAVE_SAMPLERATE)
843 AM_CONDITIONAL(HAVE_READLINE, $HAVE_READLINE)
844 AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN)
845 AM_CONDITIONAL(USE_CAPABILITIES, $USE_CAPABILITIES)
846 AM_CONDITIONAL(STRIPPED_JACKD, $STRIPPED_JACKD)
847 AM_CONDITIONAL(HAVE_PPOLL, $HAVE_PPOLL)
853 config/cpu/alpha/Makefile
854 config/cpu/cris/Makefile
855 config/cpu/generic/Makefile
856 config/cpu/i386/Makefile
857 config/cpu/i486/Makefile
858 config/cpu/ia64/Makefile
859 config/cpu/m68k/Makefile
860 config/cpu/mips/Makefile
861 config/cpu/powerpc/Makefile
862 config/cpu/s390/Makefile
864 config/os/generic/Makefile
865 config/os/gnu-linux/Makefile
866 config/os/macosx/Makefile
867 config/sysdeps/Makefile
869 doc/reference.doxygen
871 drivers/alsa/Makefile
872 drivers/alsa-midi/Makefile
873 drivers/dummy/Makefile
876 drivers/portaudio/Makefile
877 drivers/coreaudio/Makefile
878 drivers/freebob/Makefile
879 drivers/firewire/Makefile
880 drivers/netjack/Makefile
881 example-clients/Makefile
894 dnl Output summary message
898 echo $PACKAGE $VERSION :
900 echo \| Build with ALSA support............................... : $HAVE_ALSA
901 echo \| Build with old FireWire \(FreeBob\) support............. : $HAVE_FREEBOB
902 echo \| Build with new FireWire \(FFADO\) support............... : $HAVE_FIREWIRE
903 echo \| Build with OSS support................................ : $HAVE_OSS
904 echo \| Build with Sun audio support.......................... : $HAVE_SUN
905 echo \| Build with CoreAudio support.......................... : $HAVE_COREAUDIO
906 echo \| Build with PortAudio support.......................... : $HAVE_PA
907 echo \| Build with Celt support............................... : $HAVE_CELT
908 echo \| Build with dynamic buffer size support................ : $buffer_resizing
909 echo \| Compiler optimization flags........................... : $JACK_OPT_CFLAGS
910 echo \| Compiler full flags................................... : $CFLAGS
911 echo \| Install dir for libjack + backends.................... : $libdir/jack
913 echo \| Default driver backend................................ : $JACK_DEFAULT_DRIVER
914 echo \| Shared memory interface............................... : $JACK_SHM_TYPE
915 echo \| IPC Temporary directory............................... : $DEFAULT_TMP_DIR
916 echo \| Install prefix........................................ : $prefix
917 echo \| Default tmp dir....................................... : $DEFAULT_TMP_DIR