1 dnl Process this file with autoconf to produce a configure script.
8 dnl Check for existing JACK installs
11 AC_MSG_CHECKING([existing, conflicting JACK installs])
14 for dir in /usr/lib /usr/local/lib /opt/lib ; do
15 if test -d $dir ; then
16 if test $(find $dir/ -name 'libjack.*' 2>/dev/null | wc -l) -gt 0 ; then
17 if echo $prefix/lib | grep -vs $dir >/dev/null 2>&1 ; then
18 not_overwriting=$(expr $not_overwriting + 1)
20 installs="$installs $dir"
25 if test $not_overwriting -gt 0 ; then
28 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
29 echo "You appear to have at least one existing installation of JACK."
31 echo "Complete or partial JACK installs exist in:$installs"
33 echo "Installing this version will leave at least one of these"
34 echo "existing installations installed and this will probably break"
35 echo "JACK on your machine. "
37 echo "Before building, you should first remove the existing JACK"
38 echo "installation(s). "
40 echo "Alternatively use ./configure --prefix=... to force overwriting"
41 echo "the existing install."
43 echo "WARNING: ON ANY DEBIAN-DERIVED DISTRIBUTION (Debian, Ubuntu etc)"
44 echo "CHANGING THE INSTALLATION PREFIX WILL NOT PRODUCE A WORKING JACK"
45 echo "INSTALL. Please contact the distribution packager for JACK and"
46 echo "ask them to fix their packaging."
47 echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
51 AC_CONFIG_AUX_DIR(config)
55 dnl HOWTO: updating the JACK version number
57 dnl major version = ask on jackit-devel :)
58 dnl minor version = incremented when any of the public or internal
59 dnl interfaces are changed
60 dnl micro version = incremented when implementation-only
64 JACK_MINOR_VERSION=117
68 dnl HOWTO: updating the jack protocol version
70 dnl increment the protocol version whenever a change is
71 dnl made to the way libjack communicates with jackd
72 dnl that would break applications statically linked with an older
73 dnl version of libjack. NOTE: statically linking to libjack
74 dnl is a huge mistake.
76 JACK_PROTOCOL_VERSION=24
79 dnl HOWTO: updating the libjack interface version
81 dnl current = incremented whenever the public libjack API is changed
82 dnl revision = incremented when the libjack implementation is changed
83 dnl age = current libjack is both source and binary compatible with
84 dnl libjack interfaces current,current-1,...,current-age
86 dnl Note! see libtool documentation for detailed documentation
88 dnl Note Also! until we reach CURRENT>=1, the rules are somewhat
89 dnl slacker than this, and closer to those for the JACK version
96 AC_SUBST(JACK_MAJOR_VERSION)
97 AC_SUBST(JACK_MINOR_VERSION)
98 AC_SUBST(JACK_MICRO_VERSION)
100 AC_SUBST(JACK_PROTOCOL_VERSION)
101 AC_DEFINE_UNQUOTED(PROTOCOL_VERSION, "$JACK_PROTOCOL_VERSION", [Protocol version])
103 AC_SUBST(JACK_API_MAJOR_VERSION)
104 AC_SUBST(JACK_API_MINOR_VERSION)
105 AC_SUBST(JACK_API_MICRO_VERSION)
107 JACK_SO_VERSION=${JACK_API_CURRENT}:${JACK_API_REVISION}:${JACK_API_AGE}
109 JACK_VERSION=$JACK_MAJOR_VERSION.$JACK_MINOR_VERSION.${JACK_MICRO_VERSION}${BETA}
110 JACK_RELEASE=$JACK_MAJOR_VERSION-$JACK_MINOR_VERSION-${JACK_MICRO_VERSION}${BETA}
112 AC_SUBST(JACK_SO_VERSION)
113 AC_SUBST(JACK_VERSION)
114 AC_SUBST(JACK_RELEASE)
116 AM_INIT_AUTOMAKE(jack-audio-connection-kit,${JACK_VERSION})
120 dnl save any user-provided CFLAGS so we can forget
121 dnl about any nonsense that configure generates
124 ORIGINAL_CFLAGS="$CFLAGS"
126 AM_CONFIG_HEADER(config.h)
128 AC_ENABLE_SHARED(yes)
138 dnl now use those user-provided CFLAGS
139 dnl and dump whatever nonsense configure generated
140 dnl while looking for a compiler
143 CFLAGS="$ORIGINAL_CFLAGS"
145 AC_MSG_CHECKING([platform dependencies])
147 HOST_DEFAULT_TMP_DIR=/dev/shm
150 # current FreeBSD header files conflict with the OSS driver's
151 # barrier code, this may be fixed in 5.3, stay tuned.
155 # pthread_barrier* not implemented
157 # need small realtime stack
158 JACK_THREAD_STACK_TOUCH=10000
161 JACK_THREAD_STACK_TOUCH=10000 # need small realtime stack
162 JACK_CPP_VARARGS_BROKEN=1
164 JACK_USE_MACH_THREADS=1
165 OS_LDFLAGS="-framework CoreAudio -framework CoreServices -framework AudioUnit"
166 TRY_POSIX_SHM=yes # POSIX shm works better
167 HOST_DEFAULT_TMP_DIR=/tmp
174 # We need to establish suitable defaults for a 64-bit OS
178 case "${host_cpu}" in
179 x86_64|mips64|ppc64|sparc64|s390x)
185 ## libnn=lib/sparcv9 ## on 64-bit only, but that's compiler-specific
189 ## take care not to override the command-line setting
190 if test "${libdir}" = '${exec_prefix}/lib'; then
191 libdir='${exec_prefix}/'${libnn}
194 # system-dependent config.h values
195 test "x$JACK_THREAD_STACK_TOUCH" = "x" && JACK_THREAD_STACK_TOUCH=500000
196 AC_DEFINE_UNQUOTED(JACK_THREAD_STACK_TOUCH,
197 [$JACK_THREAD_STACK_TOUCH],
198 [Guaranteed size of realtime stack])
199 if test "x$JACK_CPP_VARARGS_BROKEN" != "x"; then
200 AC_DEFINE_UNQUOTED(JACK_CPP_VARARGS_BROKEN,
201 [$JACK_CPP_VARARGS_BROKEN],
202 [CPP has a broken varargs implementation])
204 if test "x$JACK_USE_MACH_THREADS" != "x"; then
205 AC_DEFINE_UNQUOTED(JACK_USE_MACH_THREADS,
206 [$JACK_USE_MACH_THREADS],
207 [Use MACH threads where possible])
211 AC_CHECK_HEADERS(string.h strings.h alloca.h)
212 AC_CHECK_HEADERS(getopt.h, [], [
213 for d in /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/ ; do
214 AC_CHECK_HEADERS($d/getopt.h, [], [CFLAGS="$CFLAGS -I$d"])
216 AC_CHECK_HEADER(/usr/include/nptl/pthread.h,
217 [CFLAGS="$CFLAGS -I/usr/include/nptl"])
219 # functions and libraries
220 AC_CHECK_FUNC(getopt_long, [],
221 AC_MSG_ERROR([*** JACK requires GNU getopt_long]))
222 AC_CHECK_FUNC(gethostent, [], AC_CHECK_LIB(nsl, gethostent))
223 AC_CHECK_FUNC(setsockopt, [], AC_CHECK_LIB(socket, setsockopt))
224 AC_CHECK_FUNC(connect, [], AC_CHECK_LIB(inet, connect))
225 AC_CHECK_FUNC(dlopen, [],
226 AC_CHECK_LIB(dl, dlopen, [],
227 AC_MSG_ERROR([*** JACK requires dynamic load support])))
228 AC_CHECK_FUNC(pthread_create, [],
229 AC_CHECK_LIB(pthread, pthread_create, [],
230 AC_MSG_ERROR([*** JACK requires POSIX threads support])))
231 AC_CHECK_FUNCS(on_exit atexit)
232 AC_CHECK_FUNCS(posix_memalign)
235 echo -n "Checking for ppoll()... "
241 AC_DEFINE(HAVE_PPOLL,1,"Whether ppoll is available")
244 AC_DEFINE(HAVE_PPOLL,0,"Whether ppoll is available")
250 AC_CHECK_FUNC(clock_gettime,
252 AC_DEFINE(HAVE_CLOCK_GETTIME,0,"Whether or not clock_gettime can be found in system libraries")
255 # if not found, check librt specifically
257 AC_CHECK_LIB(rt, clock_gettime,
259 AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries")
260 OS_LDFLAGS="$OS_LDFLAGS -lrt"
264 # should we use mlockall() on this platform?
265 if test "x$JACK_DO_NOT_MLOCK" = "x"; then
266 AC_CHECK_HEADER(sys/mman.h,
267 [AC_CHECK_FUNC(mlockall,
268 [AC_DEFINE(USE_MLOCK, 1, [Use POSIX memory locking])])])
271 # look for system support for POSIX shm API
272 AC_ARG_ENABLE(posix-shm,
273 AC_HELP_STRING([--enable-posix-shm], [use POSIX shm API (default=auto)]),
274 [TRY_POSIX_SHM=$enableval])
275 if test "x$TRY_POSIX_SHM" = "xyes"
277 AC_CHECK_FUNC(shm_open, [],
278 AC_CHECK_LIB(rt, shm_open, [], [TRY_POSIX_SHM=no]))
280 AC_MSG_CHECKING([shared memory support])
281 if test "x$TRY_POSIX_SHM" = "xyes"
283 AC_MSG_RESULT([POSIX shm_open().])
284 AC_DEFINE(USE_POSIX_SHM,1,[Use POSIX shared memory interface])
285 JACK_SHM_TYPE='"POSIX"'
288 AC_MSG_RESULT([System V shmget().])
289 JACK_SHM_TYPE='"System V"'
290 USE_POSIX_SHM="false"
292 AC_DEFINE_UNQUOTED(JACK_SHM_TYPE, [$JACK_SHM_TYPE],
293 [JACK shared memory type])
294 AM_CONDITIONAL(USE_POSIX_SHM, $USE_POSIX_SHM)
296 JACK_CORE_CFLAGS="-I\$(top_srcdir)/config -I\$(top_srcdir) \
297 -I\$(top_srcdir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall"
299 JACK_LIBC_HELPER_FLAGS=
300 AC_ARG_ENABLE(ancient_libc,
301 AC_HELP_STRING([--enable-ancient-libc],[Add required CFLAGS for libc versions too old to expose PThread R/W Lock and other modern code]),
302 JACK_LIBC_HELPER_FLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE",
303 JACK_LIBC_HELPER_FLAGS=""
306 JACK_CORE_CFLAGS="$JACK_CORE_CFLAGS $JACK_LIBC_HELPER_FLAGS"
308 AC_ARG_WITH(cpu-target,
309 [ --with-cpu-target=cpu-type explicit, overriding argument for gcc -march= flag])
313 dnl figure out how best to optimize
314 dnl JOQ: this should be done via config/configure.hosts
317 dnl ----------------------------------------------------------------------
319 if test "$target_cpu" = "powerpc64" ; then
322 AC_HELP_STRING([--enable-cell],[enable Cell BE support (default=no)]),,
325 if test "x$enable_cell" = xyes; then
326 AC_DEFINE(ENABLE_CELLBE, 1, [Define to 1 if you need support for the Cell BE.])
331 if test "$target_cpu" = "powerpc" -o "$target_cpu" = "powerpc64" ; then
333 AC_DEFINE(POWERPC, 1, "Are we running a ppc CPU?")
335 ############################
336 # Check for Altivec assembly
337 ############################
339 AC_ARG_ENABLE(altivec,
340 AC_HELP_STRING([--enable-altivec],[enable Altivec support (default=auto)]),,
341 [ enable_altivec=yes ])
343 if test "x$enable_altivec" = xyes; then
345 AC_MSG_CHECKING(whether we can compile Altivec code)
347 AC_COMPILE_IFELSE([asm ("vand %v0, %v0, %v0");],
348 AC_DEFINE(USE_ALTIVEC, 1, [Define to 1 if Altivec assembly is available.])
349 AC_DEFINE(HAVE_ALTIVEC_LINUX, 1, "Is there Altivec Support ?")
350 ALTIVEC_OPT_FLAGS="-maltivec -mabi=altivec"
355 AC_MSG_WARN([The assembler does not support the Altivec command set.])
360 dnl -mcpu=7450 does not reliably work with gcc 3.*
362 JACK_OPT_CFLAGS="-O2 -mcpu=7400 $ALTIVEC_OPT_FLAGS -mhard-float -mpowerpc-gfxopt"
364 if test "$target_cpu" = "powerpc64"; then
365 JACK_OPT_CFLAGS="-O2 -mcpu=powerpc64 $ALTIVEC_OPT_FLAGS -mhard-float"
368 elif echo $target_cpu | egrep '(i.86|x86_64)' >/dev/null; then
370 dnl Check for MMX/SSE assembly
372 if test -r /proc/cpuinfo ; then
373 procflags=`grep '^flags' /proc/cpuinfo`
374 if echo $procflags | grep -s mmx ; then
377 if echo $procflags | grep -s sse ; then
381 # this is not linux, but assume that if the processor
382 # is x86 then is supports SSE and not MMX
384 AC_MSG_WARN([Assuming your x86/x86_64 system can support SSE. Use --disable-sse if this is not the case])
386 AC_MSG_WARN([Assuming your x86/x86_64 system does not need to use MMX. Use --enable-mmx if this is not the case])
389 AC_ARG_ENABLE(optimization-by-compiler,
390 AC_HELP_STRING([--enable-optimization-by-compiler],[use compiler (NOT processor) capabilities to determine optimization flags (default=no)]),
391 optimization_by_compiler=yes,
392 optimization_by_compiler=no
395 AC_ARG_ENABLE(optimization-by-cpu,
396 AC_HELP_STRING([--enable-optimization-by-cpu],[use processor capabilities to determine optimization flags (default=yes)]),,
397 optimization_by_cpu=yes
401 AC_HELP_STRING([--enable-mmx],[enable MMX support (default=auto)]),,
405 AC_HELP_STRING([--enable-sse],[enable SSE support (default=auto)]),,
406 enable_sse=$enable_mmx)
408 if test "x$enable_mmx" = xyes; then
410 AC_MSG_CHECKING(whether we can compile MMX code)
412 AC_COMPILE_IFELSE([asm ("movq 0, %mm0");],
414 AC_DEFINE(USE_MMX, 1, [Define to 1 if MMX assembly is available.])
417 if test x$optimization_by_cpu = xyes ; then
418 if test x$cpu_supports_mmx = xyes ; then
429 AC_MSG_WARN([The assembler does not support the MMX command set.])
433 if test "x$enable_sse" = xyes; then
435 AC_MSG_CHECKING(whether we can compile SSE code)
437 AC_COMPILE_IFELSE([asm ("movntps %xmm0, 0");],
439 if test x$optimization_by_cpu = xyes ; then
440 if test x$cpu_supports_sse = xyes ; then
441 SSE_FLAGS="-msse -mfpmath=sse"
445 SSE_FLAGS="-msse -mfpmath=sse"
454 AC_MSG_WARN([The assembler does not support the SSE command set.])
458 AC_DEFINE(x86, 1, "Nope it's intel")
459 COMMON_X86_OPT_FLAGS="-O3 -fomit-frame-pointer -ffast-math -funroll-loops"
462 dnl its a little sad that OS X doesn't make it possible to identify
463 dnl the target_cpu a little more precisely. on os x we always get "i386"
464 dnl as the CPU type. we miss out on some possible optimizations as
465 dnl a result. oh well.
468 if test x$with_cpu_target != x ; then
469 JACK_OPT_CFLAGS="-march=$with_cpu_target"
471 if test "$target_cpu" = "i586"; then
472 JACK_OPT_CFLAGS="-march=i586 "
473 elif test "$target_cpu" = "i686"; then
474 JACK_OPT_CFLAGS="-march=i686"
475 elif test "$target_cpu" = "x86_64"; then
476 JACK_OPT_CFLAGS="-march=k8"
483 dnl do not add h/w specific flags if asked to let compiler
484 dnl to the optimization
487 if test x$optimization_by_compiler != xyes ; then
488 JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS $JACK_OPT_CFLAGS $MMX_FLAGS $SSE_FLAGS"
490 JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS"
495 AC_ARG_ENABLE(dynsimd,
496 AC_HELP_STRING([--enable-dynsimd],[enable dynamic SIMD selection (default=no)]),,
499 if test "x$enable_dynsimd" = xyes; then
500 AC_DEFINE(USE_DYNSIMD, 1, [Define to 1 to use dynamic SIMD selection.])
501 dnl This needs update once there's more than x86/x86-64 supported
502 SIMD_CFLAGS="-O -msse -msse2 -m3dnow"
503 AC_SUBST(SIMD_CFLAGS)
506 AC_ARG_ENABLE(optimize,
507 AC_HELP_STRING([--enable-optimize],
508 [optimize code, based on CPU or compiler, as separately selected (default=no)]),
509 [ if test x$enable_optimize != xno ; then
510 AC_MSG_WARN([optimization in use.........................])
512 # no optimization, so lets get debugging symbols instead
514 AC_MSG_WARN([no optimization.........................])
518 # no optimization, so lets get debugging symbols instead
520 AC_MSG_WARN([no optimization.........................])
524 JACK_CFLAGS="$JACK_CORE_CFLAGS $JACK_OPT_CFLAGS"
527 dnl most makefiles use JACK_CFLAGS, but simd code needs JACK_CORE_CFLAGS
530 AC_SUBST(JACK_CFLAGS)
531 AC_SUBST(JACK_CORE_CFLAGS)
534 dnl use JACK_CFLAGS for jackd compilation
537 CFLAGS="$CFLAGS $JACK_CFLAGS"
539 # allow buffer resizing unless --disable-resize specified
541 AC_ARG_ENABLE(resize,
542 AC_HELP_STRING([--enable-resize], [enable buffer resizing feature (default=yes)]),
544 if test x$enable_resize = xno ; then
550 if test x$buffer_resizing != xno; then
551 AC_DEFINE(DO_BUFFER_RESIZE,,[Enable buffer resizing])
555 AC_ARG_ENABLE(ensure-mlock,
556 AC_HELP_STRING([--enable-ensure-mlock], [server should fail if unable to lock memory (default=no)]),
558 if test x$enable_ensure_mlock != xno ; then
559 AC_DEFINE(ENSURE_MLOCK,,[Ensure that memory locking succeeds])
565 AC_HELP_STRING([--enable-debug],
566 [enable debugging messages in jackd and libjack (default=no)]),
568 if test x$enable_debug != xno ; then
569 AC_DEFINE(DEBUG_ENABLED,,[Enable debugging messages])
574 AC_ARG_ENABLE(timestamps,
575 AC_HELP_STRING([--enable-timestamps],
576 [allow clients to use the JACK timestamp API (JACK developers only) (default=no)]),
578 if test x$enable_timestamps != xno ; then
579 AC_DEFINE(WITH_TIMESTAMPS,,[Enable JACK timestamp API])
584 AC_ARG_ENABLE(preemption-check,
585 AC_HELP_STRING([--enable-preemption-check],
586 [check for inappropriate realtime preemption (requires a specially built Linux kernel) (default=no)]),
588 if test x$enable_preemption_check != xno ; then
589 echo checking for realtime preemption bugs
590 AC_DEFINE(DO_PREEMPTION_CHECKING,,
591 [check realtime preemption])
595 USE_CAPABILITIES=false
597 AC_ARG_ENABLE(capabilities,
598 AC_HELP_STRING([--enable-capabilities],[!!! LINUX 2.4 KERNELS ONLY !!! use libcap to gain realtime scheduling priviledges]),
599 [ if test "x$enable_capabilities" != "xno" ; then
600 AC_CHECK_LIB(cap, capgetp,
601 [AC_CHECK_HEADER(sys/capability.h,
602 [HAVE_CAPABILITIES=true],
603 [AC_MSG_WARN([*** no kernel support for capabilities])
604 HAVE_CAPABILITIES=false]
606 [AC_MSG_WARN([*** no libcap present])
607 HAVE_CAPABILITIES=false]
609 if test "x$HAVE_CAPABILITIES" = "xtrue"; then
610 AC_CHECK_PROG(HAVE_CAPABILITIES, md5sum, true, false)
612 if test "x$HAVE_CAPABILITIES" = "xfalse"; then
613 AC_MSG_WARN([*** required program md5sum not found])
615 if test "x$HAVE_CAPABILITIES" = "xfalse"; then
616 AC_MSG_ERROR([*** Capabilities support not present. Run configure again without --enable-capabilities.])
618 USE_CAPABILITIES=true
619 AC_DEFINE(USE_CAPABILITIES,,[Enable POSIX 1.e capabilities support])
625 AC_ARG_ENABLE(oldtrans,
626 AC_HELP_STRING([--disable-oldtrans],[remove old transport interfaces (default=yes)]),
627 [ if test "x$enable_oldtrans" = "xno" ; then
632 if test "x$with_oldtrans" != "xno" ; then
633 AC_DEFINE(OLD_TRANSPORT,,[Include old transport interfaces])
637 AC_ARG_ENABLE(stripped-jackd,
638 AC_HELP_STRING([--enable-stripped-jackd],[strip jack before computing its md5 sum (useful only with Linux 2.4 kernel)]),
639 [ if test "x$USE_CAPABILITIES" != "xtrue" ; then
640 AC_MSG_WARN([*** capabilities not enabled, stripped jackd has no effect])
641 elif test "x$enable_stripped_jackd" != "xno"; then
647 # plugins go in the addon dir.
649 ADDON_DIR='${libdir}/jack'
651 AS_AC_EXPAND(ADDON_DIR_EXPANDED,${libdir}/jack)
652 AC_DEFINE_UNQUOTED(ADDON_DIR,"$ADDON_DIR_EXPANDED",[Directory for plugins])
654 AC_ARG_WITH(html-dir,
655 AC_HELP_STRING([--with-html-dir=PATH],[where to install the html documentation]))
657 if test "x$with_html_dir" = "x" ; then
658 HTML_DIR='${pkgdatadir}'
660 HTML_DIR=$with_html_dir
666 # allow specifying default tmpdir
667 AC_ARG_WITH(default-tmpdir,
668 AC_HELP_STRING([--with-default-tmpdir],[where jackd and clients will put tmp files (default=/dev/shm)]))
670 if test "x$with_default_tmpdir" = "x" ; then
671 DEFAULT_TMP_DIR=$HOST_DEFAULT_TMP_DIR
673 DEFAULT_TMP_DIR=$with_default_tmpdir
676 AC_SUBST(DEFAULT_TMP_DIR)
677 AC_DEFINE_UNQUOTED(DEFAULT_TMP_DIR,"$DEFAULT_TMP_DIR",[Default tmp directory])
679 # Check for barrier functions in the pthreads library. The default
680 # option setting may be OS-dependent, otherwise it's "yes".
681 test "x$USE_BARRIER" = "x" && USE_BARRIER="yes"
683 AC_HELP_STRING([--without-barrier],
684 [avoid using pthread barrier functions (only used by OSS driver)]),
685 [ USE_BARRIER=$withval ])
686 if test "x$USE_BARRIER" = "xyes"; then
687 AC_CHECK_LIB([pthread], [pthread_barrier_init],
688 AC_DEFINE(USE_BARRIER, 1, [Use pthread barrier functions]))
691 # some example-clients need libsndfile
693 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0,[HAVE_SNDFILE=true], [true])
694 if test x$HAVE_SNDFILE = xfalse; then
695 AC_MSG_WARN([*** the jackrec example client will not be built])
698 # NetJack backend and internal client need libsamplerate
699 HAVE_SAMPLERATE=false
700 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.1.2,[HAVE_SAMPLERATE=true], [true])
701 if test x$HAVE_SAMPLERATE = xfalse; then
702 AC_MSG_WARN([*** the NetJack backend and internal client will not be built])
703 AC_DEFINE(HAVE_SAMPLERATE,0,"Whether libsamplerate is available")
705 NETJACK_CFLAGS="$NETJACK_CFLAGS $SAMPLERATE_CFLAGS"
706 NETJACK_LIBS="$NETJACK_LIBS $SAMPLERATE_LIBS"
707 AC_DEFINE(HAVE_SAMPLERATE,1,"Whether libsamplerate is available")
710 # Celt low-latency audio codec. netjack transmission via internet.
712 PKG_CHECK_MODULES(CELT, celt >= 0.7.0,[HAVE_CELT=true], [true])
713 if test x$HAVE_CELT = xfalse; then
714 PKG_CHECK_MODULES(CELT, celt >= 0.5.0,[HAVE_CELT=true], [true])
715 if test x$HAVE_CELT = xfalse; then
716 AC_DEFINE(HAVE_CELT,0,"Whether CELT is available")
718 AC_MSG_WARN([*** NetJack will not be built with celt support])
720 AC_DEFINE(HAVE_CELT,1,"Whether CELT is available")
721 AC_DEFINE(HAVE_CELT_API_0_5,1,"Whether CELT API is 0.5 API")
722 AC_DEFINE(HAVE_CELT_API_0_7,0,"Whether CELT API is 0.7 API")
723 AC_MSG_RESULT(yes (0.5))
724 NETJACK_LIBS="$NETJACK_LIBS $CELT_LIBS"
727 AC_DEFINE(HAVE_CELT,1,"Whether CELT is available")
728 AC_MSG_RESULT(yes (0.7))
729 AC_DEFINE(HAVE_CELT_API_0_5,0,"Whether CELT API is 0.5 API")
730 AC_DEFINE(HAVE_CELT_API_0_7,1,"Whether CELT API is 0.7 API")
731 NETJACK_LIBS="$NETJACK_LIBS $CELT_LIBS"
734 AC_SUBST(NETJACK_LIBS)
735 AC_SUBST(NETJACK_CFLAGS)
737 # Note: A bug in pkg-config causes problems if the first occurence of
738 # PKG_CHECK_MODULES can be disabled. So, if you're going to use
739 # PKG_CHECK_MODULES inside a --disable-whatever check, you need to
740 # do it somewhere *below* this comment.
742 # Check which backend drivers can be built. The last one successfully
743 # configured becomes the default JACK driver; so the order of
744 # precedence is: alsa, sun, oss, coreaudio, portaudio, dummy.
746 JACK_DEFAULT_DRIVER=\"dummy\"
748 AC_ARG_ENABLE(portaudio,
749 AC_HELP_STRING([--enable-portaudio],[build PortAudio driver]),
750 TRY_PORTAUDIO=$enableval , TRY_PORTAUDIO=no)
753 if test "x$TRY_PORTAUDIO" = "xyes"
755 # check for portaudio V18
756 AC_CHECK_LIB(portaudio, Pa_Initialize,
757 [ AC_CHECK_HEADERS(portaudio.h,
760 JACK_DEFAULT_DRIVER=\"portaudio\"
765 AM_CONDITIONAL(HAVE_PA, $HAVE_PA)
767 AC_ARG_ENABLE(coreaudio, AC_HELP_STRING([--disable-coreaudio], [ignore CoreAudio driver]),
768 TRY_COREAUDIO=$enableval , TRY_COREAUDIO=yes )
769 HAVE_COREAUDIO="false"
770 if test "x$TRY_COREAUDIO" = "xyes"
772 # check for coreaudio
773 AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
774 [ HAVE_COREAUDIO="true"
775 JACK_DEFAULT_DRIVER=\"coreaudio\"
778 AM_CONDITIONAL(HAVE_COREAUDIO, $HAVE_COREAUDIO)
780 AC_ARG_ENABLE(oss, AC_HELP_STRING([--disable-oss],[ignore OSS driver ]),
781 TRY_OSS=$enableval , TRY_OSS=yes )
783 if test "x$TRY_OSS" = "xyes"
785 # check for Open Sound System
786 AC_CHECK_HEADER([sys/soundcard.h],
788 JACK_DEFAULT_DRIVER=\"oss\"])
790 AM_CONDITIONAL(HAVE_OSS, $HAVE_OSS)
792 AC_ARG_ENABLE(sun, AC_HELP_STRING([--disable-sun],[ignore Sun driver ]),
793 TRY_SUN=$enableval , TRY_SUN=yes )
795 if test "x$TRY_SUN" = "xyes"
797 # check for Sun audio API
798 AC_CHECK_HEADER([sys/audioio.h],
800 JACK_DEFAULT_DRIVER=\"sun\"])
802 AM_CONDITIONAL(HAVE_SUN, $HAVE_SUN)
804 AC_ARG_ENABLE(freebob, AC_HELP_STRING([--disable-freebob],[ignore FreeBob driver ]),
805 TRY_FREEBOB=$enableval , TRY_FREEBOB=yes )
807 if test "x$TRY_FREEBOB" = "xyes"
809 # check for FreeBob libraries
810 PKG_CHECK_MODULES(LIBFREEBOB, libfreebob >= 1.0.0,
812 JACK_DEFAULT_DRIVER=\"freebob\"
813 ], AC_MSG_RESULT([no]))
815 AC_SUBST([LIBFREEBOB_CFLAGS])
816 AC_SUBST([LIBFREEBOB_LIBS])
819 AM_CONDITIONAL(HAVE_FREEBOB,$HAVE_FREEBOB)
821 AC_ARG_ENABLE(firewire, AC_HELP_STRING([--disable-firewire],[ignore FireWire driver (FFADO)]),
822 TRY_FIREWIRE=$enableval , TRY_FIREWIRE=yes )
823 HAVE_FIREWIRE="false"
824 if test "x$TRY_FIREWIRE" = "xyes"
826 # check for FFADO libraries
827 PKG_CHECK_MODULES(LIBFFADO, libffado >= 1.999.17,
828 [HAVE_FIREWIRE="true"
829 JACK_DEFAULT_DRIVER=\"firewire\"
830 ], AC_MSG_RESULT([no]))
832 AC_SUBST([LIBFFADO_CFLAGS])
833 AC_SUBST([LIBFFADO_LIBS])
836 AM_CONDITIONAL(HAVE_FIREWIRE,$HAVE_FIREWIRE)
838 AC_ARG_ENABLE(alsa, AC_HELP_STRING([--disable-alsa],[ignore ALSA driver ]),
839 TRY_ALSA=$enableval , TRY_ALSA=yes )
841 if test "x$TRY_ALSA" = "xyes"
843 # check for ALSA >= 1.0.0
844 PKG_CHECK_MODULES(ALSA, alsa >= 1.0.0,
847 JACK_DEFAULT_DRIVER=\"alsa\"
848 ], AC_MSG_RESULT([no]), [-lm]
852 AM_CONDITIONAL(HAVE_ALSA, $HAVE_ALSA)
854 HAVE_ALSA_MIDI=$HAVE_ALSA
855 AM_CONDITIONAL(HAVE_ALSA_MIDI, $HAVE_ALSA_MIDI)
857 if test "$JACK_DEFAULT_DRIVER" = \"dummy\"; then
858 AC_MSG_WARN([Only the dummy driver can be built])
860 AC_DEFINE_UNQUOTED(JACK_DEFAULT_DRIVER,
861 [$JACK_DEFAULT_DRIVER],
862 [Default JACK driver])
864 JACK_SEMAPHORE_KEY=0x282929
865 AC_DEFINE_UNQUOTED(JACK_SEMAPHORE_KEY,
866 [$JACK_SEMAPHORE_KEY],
867 [ an integer constant used as the semaphore and SysV SHM key. see libjack/shm.c for usage])
868 AC_SUBST(JACK_SEMAPHORE_KEY)
870 # On some systems, readline depends on termcap or ncurses. But, the
871 # MacOSX linker complains bitterly if these libraries are explicitly
874 # AC_CHECK_LIB() foolishly assumes that checking a library for an entry
875 # point always returns the same result regardless of any dependent
876 # libraries specified. The `unset ac_cv_lib_readline_readline' erases
877 # the cached result to work around this problem.
880 AC_CHECK_LIB(readline, readline, [:],
881 [unset ac_cv_lib_readline_readline
882 AC_CHECK_LIB(readline, readline, [READLINE_DEPS="-ltermcap"],
883 [unset ac_cv_lib_readline_readline
884 AC_CHECK_LIB(readline, readline,
885 [READLINE_DEPS="-lncurses"], [HAVE_READLINE=false], "-lncurses")],
887 AC_CHECK_HEADER(readline/chardefs.h, [], [HAVE_READLINE=false])
888 if test x$HAVE_READLINE = xfalse; then
889 AC_MSG_WARN([*** the jack_transport example client will not be built])
891 AC_SUBST(READLINE_DEPS)
893 # you need doxygen to make dist.
894 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
895 if test $HAVE_DOXYGEN = "false"; then
896 AC_MSG_WARN([*** doxygen not found, docs will not be built])
899 AM_CONDITIONAL(HAVE_SNDFILE, $HAVE_SNDFILE)
900 AM_CONDITIONAL(HAVE_CELT, $HAVE_CELT)
901 AM_CONDITIONAL(HAVE_SAMPLERATE, $HAVE_SAMPLERATE)
902 AM_CONDITIONAL(HAVE_READLINE, $HAVE_READLINE)
903 AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN)
904 AM_CONDITIONAL(USE_CAPABILITIES, $USE_CAPABILITIES)
905 AM_CONDITIONAL(STRIPPED_JACKD, $STRIPPED_JACKD)
906 AM_CONDITIONAL(HAVE_PPOLL, $HAVE_PPOLL)
912 config/cpu/alpha/Makefile
913 config/cpu/cris/Makefile
914 config/cpu/generic/Makefile
915 config/cpu/i386/Makefile
916 config/cpu/i486/Makefile
917 config/cpu/ia64/Makefile
918 config/cpu/m68k/Makefile
919 config/cpu/mips/Makefile
920 config/cpu/powerpc/Makefile
921 config/cpu/s390/Makefile
923 config/os/generic/Makefile
924 config/os/gnu-linux/Makefile
925 config/os/macosx/Makefile
926 config/sysdeps/Makefile
928 doc/reference.doxygen
930 drivers/alsa/Makefile
931 drivers/alsa-midi/Makefile
932 drivers/dummy/Makefile
935 drivers/portaudio/Makefile
936 drivers/coreaudio/Makefile
937 drivers/freebob/Makefile
938 drivers/firewire/Makefile
939 drivers/netjack/Makefile
940 example-clients/Makefile
953 dnl Output summary message
957 echo $PACKAGE $VERSION :
959 echo \| Build with ALSA support............................... : $HAVE_ALSA
960 echo \| Build with old FireWire \(FreeBob\) support............. : $HAVE_FREEBOB
961 echo \| Build with new FireWire \(FFADO\) support............... : $HAVE_FIREWIRE
962 echo \| Build with OSS support................................ : $HAVE_OSS
963 echo \| Build with Sun audio support.......................... : $HAVE_SUN
964 echo \| Build with CoreAudio support.......................... : $HAVE_COREAUDIO
965 echo \| Build with PortAudio support.......................... : $HAVE_PA
966 echo \| Build with Celt support............................... : $HAVE_CELT
967 echo \| Build with dynamic buffer size support................ : $buffer_resizing
968 echo \| Compiler optimization flags........................... : $JACK_OPT_CFLAGS
969 echo \| Compiler full flags................................... : $CFLAGS
970 echo \| Install dir for libjack + backends.................... : $libdir/jack
972 echo \| Default driver backend................................ : $JACK_DEFAULT_DRIVER
973 echo \| Shared memory interface............................... : $JACK_SHM_TYPE
974 echo \| IPC Temporary directory............................... : $DEFAULT_TMP_DIR
975 echo \| Install prefix........................................ : $prefix
976 echo \| Default tmp dir....................................... : $DEFAULT_TMP_DIR