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=118
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})
119 dnl save any user-provided CFLAGS so we can forget
120 dnl about any nonsense that configure generates
123 ORIGINAL_CFLAGS="$CFLAGS"
125 AM_CONFIG_HEADER(config.h)
127 AC_ENABLE_SHARED(yes)
137 dnl now use those user-provided CFLAGS
138 dnl and dump whatever nonsense configure generated
139 dnl while looking for a compiler
142 CFLAGS="$ORIGINAL_CFLAGS"
144 AC_MSG_CHECKING([platform dependencies])
146 HOST_DEFAULT_TMP_DIR=/dev/shm
149 # current FreeBSD header files conflict with the OSS driver's
150 # barrier code, this may be fixed in 5.3, stay tuned.
154 # pthread_barrier* not implemented
156 # need small realtime stack
157 JACK_THREAD_STACK_TOUCH=10000
160 JACK_THREAD_STACK_TOUCH=10000 # need small realtime stack
161 JACK_CPP_VARARGS_BROKEN=1
163 JACK_USE_MACH_THREADS=1
164 OS_LDFLAGS="-framework CoreAudio -framework CoreServices -framework AudioUnit"
165 TRY_POSIX_SHM=yes # POSIX shm works better
166 HOST_DEFAULT_TMP_DIR=/tmp
173 # We need to establish suitable defaults for a 64-bit OS
177 case "${host_cpu}" in
178 x86_64|mips64|ppc64|sparc64|s390x)
184 ## libnn=lib/sparcv9 ## on 64-bit only, but that's compiler-specific
188 ## take care not to override the command-line setting
189 if test "${libdir}" = '${exec_prefix}/lib'; then
190 libdir='${exec_prefix}/'${libnn}
193 # system-dependent config.h values
194 test "x$JACK_THREAD_STACK_TOUCH" = "x" && JACK_THREAD_STACK_TOUCH=500000
195 AC_DEFINE_UNQUOTED(JACK_THREAD_STACK_TOUCH,
196 [$JACK_THREAD_STACK_TOUCH],
197 [Guaranteed size of realtime stack])
198 if test "x$JACK_CPP_VARARGS_BROKEN" != "x"; then
199 AC_DEFINE_UNQUOTED(JACK_CPP_VARARGS_BROKEN,
200 [$JACK_CPP_VARARGS_BROKEN],
201 [CPP has a broken varargs implementation])
203 if test "x$JACK_USE_MACH_THREADS" != "x"; then
204 AC_DEFINE_UNQUOTED(JACK_USE_MACH_THREADS,
205 [$JACK_USE_MACH_THREADS],
206 [Use MACH threads where possible])
210 AC_CHECK_HEADERS(string.h strings.h alloca.h)
211 AC_CHECK_HEADERS(getopt.h, [], [
212 for d in /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/ ; do
213 AC_CHECK_HEADERS($d/getopt.h, [], [CFLAGS="$CFLAGS -I$d"])
215 AC_CHECK_HEADER(/usr/include/nptl/pthread.h,
216 [CFLAGS="$CFLAGS -I/usr/include/nptl"])
218 # functions and libraries
219 AC_CHECK_FUNC(getopt_long, [],
220 AC_MSG_ERROR([*** JACK requires GNU getopt_long]))
221 AC_CHECK_FUNC(gethostent, [], AC_CHECK_LIB(nsl, gethostent))
222 AC_CHECK_FUNC(setsockopt, [], AC_CHECK_LIB(socket, setsockopt))
223 AC_CHECK_FUNC(connect, [], AC_CHECK_LIB(inet, connect))
224 AC_CHECK_FUNC(dlopen, [],
225 AC_CHECK_LIB(dl, dlopen, [],
226 AC_MSG_ERROR([*** JACK requires dynamic load support])))
227 AC_CHECK_FUNC(pthread_create, [],
228 AC_CHECK_LIB(pthread, pthread_create, [],
229 AC_MSG_ERROR([*** JACK requires POSIX threads support])))
230 AC_CHECK_FUNCS(on_exit atexit)
231 AC_CHECK_FUNCS(posix_memalign)
234 echo -n "Checking for ppoll()... "
240 AC_DEFINE(HAVE_PPOLL,1,"Whether ppoll is available")
243 AC_DEFINE(HAVE_PPOLL,0,"Whether ppoll is available")
249 AC_CHECK_FUNC(clock_gettime,
251 AC_DEFINE(HAVE_CLOCK_GETTIME,0,"Whether or not clock_gettime can be found in system libraries")
254 # if not found, check librt specifically
256 AC_CHECK_LIB(rt, clock_gettime,
258 AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries")
259 OS_LDFLAGS="$OS_LDFLAGS -lrt"
263 # should we use mlockall() on this platform?
264 if test "x$JACK_DO_NOT_MLOCK" = "x"; then
265 AC_CHECK_HEADER(sys/mman.h,
266 [AC_CHECK_FUNC(mlockall,
267 [AC_DEFINE(USE_MLOCK, 1, [Use POSIX memory locking])])])
270 # look for system support for POSIX shm API
271 AC_ARG_ENABLE(posix-shm,
272 AC_HELP_STRING([--enable-posix-shm], [use POSIX shm API (default=auto)]),
273 [TRY_POSIX_SHM=$enableval])
274 if test "x$TRY_POSIX_SHM" = "xyes"
276 AC_CHECK_FUNC(shm_open, [],
277 AC_CHECK_LIB(rt, shm_open, [], [TRY_POSIX_SHM=no]))
279 AC_MSG_CHECKING([shared memory support])
280 if test "x$TRY_POSIX_SHM" = "xyes"
282 AC_MSG_RESULT([POSIX shm_open().])
283 AC_DEFINE(USE_POSIX_SHM,1,[Use POSIX shared memory interface])
284 JACK_SHM_TYPE='"POSIX"'
287 AC_MSG_RESULT([System V shmget().])
288 JACK_SHM_TYPE='"System V"'
289 USE_POSIX_SHM="false"
291 AC_DEFINE_UNQUOTED(JACK_SHM_TYPE, [$JACK_SHM_TYPE],
292 [JACK shared memory type])
293 AM_CONDITIONAL(USE_POSIX_SHM, $USE_POSIX_SHM)
295 JACK_CORE_CFLAGS="-I\$(top_srcdir)/config -I\$(top_srcdir) \
296 -I\$(top_srcdir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall"
298 JACK_LIBC_HELPER_FLAGS=
299 AC_ARG_ENABLE(ancient_libc,
300 AC_HELP_STRING([--enable-ancient-libc],[Add required CFLAGS for libc versions too old to expose PThread R/W Lock and other modern code]),
301 JACK_LIBC_HELPER_FLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE",
302 JACK_LIBC_HELPER_FLAGS=""
305 JACK_CORE_CFLAGS="$JACK_CORE_CFLAGS $JACK_LIBC_HELPER_FLAGS"
307 AC_ARG_WITH(cpu-target,
308 [ --with-cpu-target=cpu-type explicit, overriding argument for gcc -march= flag])
312 dnl figure out how best to optimize
313 dnl JOQ: this should be done via config/configure.hosts
316 dnl ----------------------------------------------------------------------
318 if test "$target_cpu" = "powerpc64" ; then
321 AC_HELP_STRING([--enable-cell],[enable Cell BE support (default=no)]),,
324 if test "x$enable_cell" = xyes; then
325 AC_DEFINE(ENABLE_CELLBE, 1, [Define to 1 if you need support for the Cell BE.])
330 if test "$target_cpu" = "powerpc" -o "$target_cpu" = "powerpc64" ; then
332 AC_DEFINE(POWERPC, 1, "Are we running a ppc CPU?")
334 ############################
335 # Check for Altivec assembly
336 ############################
338 AC_ARG_ENABLE(altivec,
339 AC_HELP_STRING([--enable-altivec],[enable Altivec support (default=auto)]),,
340 [ enable_altivec=yes ])
342 if test "x$enable_altivec" = xyes; then
344 AC_MSG_CHECKING(whether we can compile Altivec code)
346 AC_COMPILE_IFELSE([asm ("vand %v0, %v0, %v0");],
347 AC_DEFINE(USE_ALTIVEC, 1, [Define to 1 if Altivec assembly is available.])
348 AC_DEFINE(HAVE_ALTIVEC_LINUX, 1, "Is there Altivec Support ?")
349 ALTIVEC_OPT_FLAGS="-maltivec -mabi=altivec"
354 AC_MSG_WARN([The assembler does not support the Altivec command set.])
359 dnl -mcpu=7450 does not reliably work with gcc 3.*
361 JACK_OPT_CFLAGS="-O2 -mcpu=7400 $ALTIVEC_OPT_FLAGS -mhard-float -mpowerpc-gfxopt"
363 if test "$target_cpu" = "powerpc64"; then
364 JACK_OPT_CFLAGS="-O2 -mcpu=powerpc64 $ALTIVEC_OPT_FLAGS -mhard-float"
367 elif echo $target_cpu | egrep '(i.86|x86_64)' >/dev/null; then
369 dnl Check for MMX/SSE assembly
371 if test -r /proc/cpuinfo ; then
372 procflags=`grep '^flags' /proc/cpuinfo`
373 if echo $procflags | grep -s mmx ; then
376 if echo $procflags | grep -s sse ; then
380 # this is not linux, but assume that if the processor
381 # is x86 then is supports SSE and not MMX
383 AC_MSG_WARN([Assuming your x86/x86_64 system can support SSE. Use --disable-sse if this is not the case])
385 AC_MSG_WARN([Assuming your x86/x86_64 system does not need to use MMX. Use --enable-mmx if this is not the case])
388 AC_ARG_ENABLE(optimization-by-compiler,
389 AC_HELP_STRING([--enable-optimization-by-compiler],[use compiler (NOT processor) capabilities to determine optimization flags (default=no)]),
390 optimization_by_compiler=yes,
391 optimization_by_compiler=no
394 AC_ARG_ENABLE(optimization-by-cpu,
395 AC_HELP_STRING([--enable-optimization-by-cpu],[use processor capabilities to determine optimization flags (default=yes)]),,
396 optimization_by_cpu=yes
400 AC_HELP_STRING([--enable-mmx],[enable MMX support (default=auto)]),,
404 AC_HELP_STRING([--enable-sse],[enable SSE support (default=auto)]),,
405 enable_sse=$enable_mmx)
407 if test "x$enable_mmx" = xyes; then
409 AC_MSG_CHECKING(whether we can compile MMX code)
411 AC_COMPILE_IFELSE([asm ("movq 0, %mm0");],
413 AC_DEFINE(USE_MMX, 1, [Define to 1 if MMX assembly is available.])
416 if test x$optimization_by_cpu = xyes ; then
417 if test x$cpu_supports_mmx = xyes ; then
428 AC_MSG_WARN([The assembler does not support the MMX command set.])
432 if test "x$enable_sse" = xyes; then
434 AC_MSG_CHECKING(whether we can compile SSE code)
436 AC_COMPILE_IFELSE([asm ("movntps %xmm0, 0");],
438 if test x$optimization_by_cpu = xyes ; then
439 if test x$cpu_supports_sse = xyes ; then
440 SSE_FLAGS="-msse -mfpmath=sse"
444 SSE_FLAGS="-msse -mfpmath=sse"
453 AC_MSG_WARN([The assembler does not support the SSE command set.])
457 AC_DEFINE(x86, 1, "Nope it's intel")
458 COMMON_X86_OPT_FLAGS="-O3 -fomit-frame-pointer -ffast-math -funroll-loops"
461 dnl its a little sad that OS X doesn't make it possible to identify
462 dnl the target_cpu a little more precisely. on os x we always get "i386"
463 dnl as the CPU type. we miss out on some possible optimizations as
464 dnl a result. oh well.
467 if test x$with_cpu_target != x ; then
468 JACK_OPT_CFLAGS="-march=$with_cpu_target"
470 if test "$target_cpu" = "i586"; then
471 JACK_OPT_CFLAGS="-march=i586 "
472 elif test "$target_cpu" = "i686"; then
473 JACK_OPT_CFLAGS="-march=i686"
474 elif test "$target_cpu" = "x86_64"; then
475 JACK_OPT_CFLAGS="-march=k8"
482 dnl do not add h/w specific flags if asked to let compiler
483 dnl to the optimization
486 if test x$optimization_by_compiler != xyes ; then
487 JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS $JACK_OPT_CFLAGS $MMX_FLAGS $SSE_FLAGS"
489 JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS"
494 AC_ARG_ENABLE(dynsimd,
495 AC_HELP_STRING([--enable-dynsimd],[enable dynamic SIMD selection (default=no)]),,
498 if test "x$enable_dynsimd" = xyes; then
499 AC_DEFINE(USE_DYNSIMD, 1, [Define to 1 to use dynamic SIMD selection.])
500 dnl This needs update once there's more than x86/x86-64 supported
501 SIMD_CFLAGS="-O -msse -msse2 -m3dnow"
502 AC_SUBST(SIMD_CFLAGS)
505 AC_ARG_ENABLE(optimize,
506 AC_HELP_STRING([--enable-optimize],
507 [optimize code, based on CPU or compiler, as separately selected (default=no)]),
508 [ if test x$enable_optimize != xno ; then
509 AC_MSG_WARN([optimization in use.........................])
511 # no optimization, so lets get debugging symbols instead
513 AC_MSG_WARN([no optimization.........................])
517 # no optimization, so lets get debugging symbols instead
519 AC_MSG_WARN([no optimization.........................])
523 JACK_CFLAGS="$JACK_CORE_CFLAGS $JACK_OPT_CFLAGS"
526 dnl most makefiles use JACK_CFLAGS, but simd code needs JACK_CORE_CFLAGS
529 AC_SUBST(JACK_CFLAGS)
530 AC_SUBST(JACK_CORE_CFLAGS)
533 dnl use JACK_CFLAGS for jackd compilation
536 CFLAGS="$CFLAGS $JACK_CFLAGS"
538 # allow buffer resizing unless --disable-resize specified
540 AC_ARG_ENABLE(resize,
541 AC_HELP_STRING([--enable-resize], [enable buffer resizing feature (default=yes)]),
543 if test x$enable_resize = xno ; then
549 if test x$buffer_resizing != xno; then
550 AC_DEFINE(DO_BUFFER_RESIZE,,[Enable buffer resizing])
554 AC_ARG_ENABLE(ensure-mlock,
555 AC_HELP_STRING([--enable-ensure-mlock], [server should fail if unable to lock memory (default=no)]),
557 if test x$enable_ensure_mlock != xno ; then
558 AC_DEFINE(ENSURE_MLOCK,,[Ensure that memory locking succeeds])
564 AC_HELP_STRING([--enable-debug],
565 [enable debugging messages in jackd and libjack (default=no)]),
567 if test x$enable_debug != xno ; then
568 AC_DEFINE(DEBUG_ENABLED,,[Enable debugging messages])
573 AC_ARG_ENABLE(timestamps,
574 AC_HELP_STRING([--enable-timestamps],
575 [allow clients to use the JACK timestamp API (JACK developers only) (default=no)]),
577 if test x$enable_timestamps != xno ; then
578 AC_DEFINE(WITH_TIMESTAMPS,,[Enable JACK timestamp API])
583 AC_ARG_ENABLE(preemption-check,
584 AC_HELP_STRING([--enable-preemption-check],
585 [check for inappropriate realtime preemption (requires a specially built Linux kernel) (default=no)]),
587 if test x$enable_preemption_check != xno ; then
588 echo checking for realtime preemption bugs
589 AC_DEFINE(DO_PREEMPTION_CHECKING,,
590 [check realtime preemption])
594 USE_CAPABILITIES=false
596 AC_ARG_ENABLE(capabilities,
597 AC_HELP_STRING([--enable-capabilities],[!!! LINUX 2.4 KERNELS ONLY !!! use libcap to gain realtime scheduling priviledges]),
598 [ if test "x$enable_capabilities" != "xno" ; then
599 AC_CHECK_LIB(cap, capgetp,
600 [AC_CHECK_HEADER(sys/capability.h,
601 [HAVE_CAPABILITIES=true],
602 [AC_MSG_WARN([*** no kernel support for capabilities])
603 HAVE_CAPABILITIES=false]
605 [AC_MSG_WARN([*** no libcap present])
606 HAVE_CAPABILITIES=false]
608 if test "x$HAVE_CAPABILITIES" = "xtrue"; then
609 AC_CHECK_PROG(HAVE_CAPABILITIES, md5sum, true, false)
611 if test "x$HAVE_CAPABILITIES" = "xfalse"; then
612 AC_MSG_WARN([*** required program md5sum not found])
614 if test "x$HAVE_CAPABILITIES" = "xfalse"; then
615 AC_MSG_ERROR([*** Capabilities support not present. Run configure again without --enable-capabilities.])
617 USE_CAPABILITIES=true
618 AC_DEFINE(USE_CAPABILITIES,,[Enable POSIX 1.e capabilities support])
624 AC_ARG_ENABLE(oldtrans,
625 AC_HELP_STRING([--disable-oldtrans],[remove old transport interfaces (default=yes)]),
626 [ if test "x$enable_oldtrans" = "xno" ; then
631 if test "x$with_oldtrans" != "xno" ; then
632 AC_DEFINE(OLD_TRANSPORT,,[Include old transport interfaces])
636 AC_ARG_ENABLE(stripped-jackd,
637 AC_HELP_STRING([--enable-stripped-jackd],[strip jack before computing its md5 sum (useful only with Linux 2.4 kernel)]),
638 [ if test "x$USE_CAPABILITIES" != "xtrue" ; then
639 AC_MSG_WARN([*** capabilities not enabled, stripped jackd has no effect])
640 elif test "x$enable_stripped_jackd" != "xno"; then
646 # plugins go in the addon dir.
648 ADDON_DIR='${libdir}/jack'
650 AS_AC_EXPAND(ADDON_DIR_EXPANDED,${libdir}/jack)
651 AC_DEFINE_UNQUOTED(ADDON_DIR,"$ADDON_DIR_EXPANDED",[Directory for plugins])
653 AC_ARG_WITH(html-dir,
654 AC_HELP_STRING([--with-html-dir=PATH],[where to install the html documentation]))
656 if test "x$with_html_dir" = "x" ; then
657 HTML_DIR='${pkgdatadir}'
659 HTML_DIR=$with_html_dir
665 # allow specifying default tmpdir
666 AC_ARG_WITH(default-tmpdir,
667 AC_HELP_STRING([--with-default-tmpdir],[where jackd and clients will put tmp files (default=/dev/shm)]))
669 if test "x$with_default_tmpdir" = "x" ; then
670 DEFAULT_TMP_DIR=$HOST_DEFAULT_TMP_DIR
672 DEFAULT_TMP_DIR=$with_default_tmpdir
675 AC_SUBST(DEFAULT_TMP_DIR)
676 AC_DEFINE_UNQUOTED(DEFAULT_TMP_DIR,"$DEFAULT_TMP_DIR",[Default tmp directory])
678 # Check for barrier functions in the pthreads library. The default
679 # option setting may be OS-dependent, otherwise it's "yes".
680 test "x$USE_BARRIER" = "x" && USE_BARRIER="yes"
682 AC_HELP_STRING([--without-barrier],
683 [avoid using pthread barrier functions (only used by OSS driver)]),
684 [ USE_BARRIER=$withval ])
685 if test "x$USE_BARRIER" = "xyes"; then
686 AC_CHECK_LIB([pthread], [pthread_barrier_init],
687 AC_DEFINE(USE_BARRIER, 1, [Use pthread barrier functions]))
690 # some example-clients need libsndfile
692 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0,[HAVE_SNDFILE=true], [true])
693 if test x$HAVE_SNDFILE = xfalse; then
694 AC_MSG_WARN([*** the jackrec example client will not be built])
697 # NetJack backend and internal client need libsamplerate
698 HAVE_SAMPLERATE=false
699 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.1.2,[HAVE_SAMPLERATE=true], [true])
700 if test x$HAVE_SAMPLERATE = xfalse; then
701 AC_MSG_WARN([*** the NetJack backend and internal client will not be built])
702 AC_DEFINE(HAVE_SAMPLERATE,0,"Whether libsamplerate is available")
704 NETJACK_CFLAGS="$NETJACK_CFLAGS $SAMPLERATE_CFLAGS"
705 NETJACK_LIBS="$NETJACK_LIBS $SAMPLERATE_LIBS"
706 AC_DEFINE(HAVE_SAMPLERATE,1,"Whether libsamplerate is available")
709 # Celt low-latency audio codec. netjack transmission via internet.
711 PKG_CHECK_MODULES(CELT, celt >= 0.7.0,[HAVE_CELT=true], [true])
712 if test x$HAVE_CELT = xfalse; then
713 PKG_CHECK_MODULES(CELT, celt >= 0.5.0,[HAVE_CELT=true], [true])
714 if test x$HAVE_CELT = xfalse; then
715 AC_DEFINE(HAVE_CELT,0,"Whether CELT is available")
717 AC_MSG_WARN([*** NetJack will not be built with celt support])
719 AC_DEFINE(HAVE_CELT,1,"Whether CELT is available")
720 AC_DEFINE(HAVE_CELT_API_0_5,1,"Whether CELT API is 0.5 API")
721 AC_DEFINE(HAVE_CELT_API_0_7,0,"Whether CELT API is 0.7 API")
722 AC_MSG_RESULT(yes (0.5))
723 NETJACK_LIBS="$NETJACK_LIBS $CELT_LIBS"
726 AC_DEFINE(HAVE_CELT,1,"Whether CELT is available")
727 AC_MSG_RESULT(yes (0.7))
728 AC_DEFINE(HAVE_CELT_API_0_5,0,"Whether CELT API is 0.5 API")
729 AC_DEFINE(HAVE_CELT_API_0_7,1,"Whether CELT API is 0.7 API")
730 NETJACK_LIBS="$NETJACK_LIBS $CELT_LIBS"
733 AC_SUBST(NETJACK_LIBS)
734 AC_SUBST(NETJACK_CFLAGS)
736 # Note: A bug in pkg-config causes problems if the first occurence of
737 # PKG_CHECK_MODULES can be disabled. So, if you're going to use
738 # PKG_CHECK_MODULES inside a --disable-whatever check, you need to
739 # do it somewhere *below* this comment.
741 # Check which backend drivers can be built. The last one successfully
742 # configured becomes the default JACK driver; so the order of
743 # precedence is: alsa, sun, oss, coreaudio, portaudio, dummy.
745 JACK_DEFAULT_DRIVER=\"dummy\"
747 AC_ARG_ENABLE(portaudio,
748 AC_HELP_STRING([--enable-portaudio],[build PortAudio driver]),
749 TRY_PORTAUDIO=$enableval , TRY_PORTAUDIO=no)
752 if test "x$TRY_PORTAUDIO" = "xyes"
754 # check for portaudio V18
755 AC_CHECK_LIB(portaudio, Pa_Initialize,
756 [ AC_CHECK_HEADERS(portaudio.h,
759 JACK_DEFAULT_DRIVER=\"portaudio\"
764 AM_CONDITIONAL(HAVE_PA, $HAVE_PA)
766 AC_ARG_ENABLE(coreaudio, AC_HELP_STRING([--disable-coreaudio], [ignore CoreAudio driver]),
767 TRY_COREAUDIO=$enableval , TRY_COREAUDIO=yes )
768 HAVE_COREAUDIO="false"
769 if test "x$TRY_COREAUDIO" = "xyes"
771 # check for coreaudio
772 AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
773 [ HAVE_COREAUDIO="true"
774 JACK_DEFAULT_DRIVER=\"coreaudio\"
777 AM_CONDITIONAL(HAVE_COREAUDIO, $HAVE_COREAUDIO)
779 AC_ARG_ENABLE(oss, AC_HELP_STRING([--disable-oss],[ignore OSS driver ]),
780 TRY_OSS=$enableval , TRY_OSS=yes )
782 if test "x$TRY_OSS" = "xyes"
784 # check for Open Sound System
785 AC_CHECK_HEADER([sys/soundcard.h],
787 JACK_DEFAULT_DRIVER=\"oss\"])
789 AM_CONDITIONAL(HAVE_OSS, $HAVE_OSS)
791 AC_ARG_ENABLE(sun, AC_HELP_STRING([--disable-sun],[ignore Sun driver ]),
792 TRY_SUN=$enableval , TRY_SUN=yes )
794 if test "x$TRY_SUN" = "xyes"
796 # check for Sun audio API
797 AC_CHECK_HEADER([sys/audioio.h],
799 JACK_DEFAULT_DRIVER=\"sun\"])
801 AM_CONDITIONAL(HAVE_SUN, $HAVE_SUN)
803 AC_ARG_ENABLE(freebob, AC_HELP_STRING([--disable-freebob],[ignore FreeBob driver ]),
804 TRY_FREEBOB=$enableval , TRY_FREEBOB=yes )
806 if test "x$TRY_FREEBOB" = "xyes"
808 # check for FreeBob libraries
809 PKG_CHECK_MODULES(LIBFREEBOB, libfreebob >= 1.0.0,
811 JACK_DEFAULT_DRIVER=\"freebob\"
812 ], AC_MSG_RESULT([no]))
814 AC_SUBST([LIBFREEBOB_CFLAGS])
815 AC_SUBST([LIBFREEBOB_LIBS])
818 AM_CONDITIONAL(HAVE_FREEBOB,$HAVE_FREEBOB)
820 AC_ARG_ENABLE(firewire, AC_HELP_STRING([--disable-firewire],[ignore FireWire driver (FFADO)]),
821 TRY_FIREWIRE=$enableval , TRY_FIREWIRE=yes )
822 HAVE_FIREWIRE="false"
823 if test "x$TRY_FIREWIRE" = "xyes"
825 # check for FFADO libraries
826 PKG_CHECK_MODULES(LIBFFADO, libffado >= 1.999.17,
827 [HAVE_FIREWIRE="true"
828 JACK_DEFAULT_DRIVER=\"firewire\"
829 ], AC_MSG_RESULT([no]))
831 AC_SUBST([LIBFFADO_CFLAGS])
832 AC_SUBST([LIBFFADO_LIBS])
835 AM_CONDITIONAL(HAVE_FIREWIRE,$HAVE_FIREWIRE)
837 AC_ARG_ENABLE(alsa, AC_HELP_STRING([--disable-alsa],[ignore ALSA driver ]),
838 TRY_ALSA=$enableval , TRY_ALSA=yes )
840 if test "x$TRY_ALSA" = "xyes"
842 # check for ALSA >= 1.0.18
843 PKG_CHECK_MODULES(ALSA, alsa >= 1.0.18,
846 JACK_DEFAULT_DRIVER=\"alsa\"
847 ], AC_MSG_RESULT([no]), [-lm]
851 AM_CONDITIONAL(HAVE_ALSA, $HAVE_ALSA)
853 HAVE_ALSA_MIDI=$HAVE_ALSA
854 AM_CONDITIONAL(HAVE_ALSA_MIDI, $HAVE_ALSA_MIDI)
856 if test "$JACK_DEFAULT_DRIVER" = \"dummy\"; then
857 AC_MSG_WARN([Only the dummy driver can be built])
859 AC_DEFINE_UNQUOTED(JACK_DEFAULT_DRIVER,
860 [$JACK_DEFAULT_DRIVER],
861 [Default JACK driver])
863 JACK_SEMAPHORE_KEY=0x282929
864 AC_DEFINE_UNQUOTED(JACK_SEMAPHORE_KEY,
865 [$JACK_SEMAPHORE_KEY],
866 [ an integer constant used as the semaphore and SysV SHM key. see libjack/shm.c for usage])
867 AC_SUBST(JACK_SEMAPHORE_KEY)
869 # On some systems, readline depends on termcap or ncurses. But, the
870 # MacOSX linker complains bitterly if these libraries are explicitly
873 # AC_CHECK_LIB() foolishly assumes that checking a library for an entry
874 # point always returns the same result regardless of any dependent
875 # libraries specified. The `unset ac_cv_lib_readline_readline' erases
876 # the cached result to work around this problem.
879 AC_CHECK_LIB(readline, readline, [:],
880 [unset ac_cv_lib_readline_readline
881 AC_CHECK_LIB(readline, readline, [READLINE_DEPS="-ltermcap"],
882 [unset ac_cv_lib_readline_readline
883 AC_CHECK_LIB(readline, readline,
884 [READLINE_DEPS="-lncurses"], [HAVE_READLINE=false], "-lncurses")],
886 AC_CHECK_HEADER(readline/chardefs.h, [], [HAVE_READLINE=false])
887 if test x$HAVE_READLINE = xfalse; then
888 AC_MSG_WARN([*** the jack_transport example client will not be built])
890 AC_SUBST(READLINE_DEPS)
892 # you need doxygen to make dist.
893 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
894 if test $HAVE_DOXYGEN = "false"; then
895 AC_MSG_WARN([*** doxygen not found, docs will not be built])
898 AM_CONDITIONAL(HAVE_SNDFILE, $HAVE_SNDFILE)
899 AM_CONDITIONAL(HAVE_CELT, $HAVE_CELT)
900 AM_CONDITIONAL(HAVE_SAMPLERATE, $HAVE_SAMPLERATE)
901 AM_CONDITIONAL(HAVE_READLINE, $HAVE_READLINE)
902 AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN)
903 AM_CONDITIONAL(USE_CAPABILITIES, $USE_CAPABILITIES)
904 AM_CONDITIONAL(STRIPPED_JACKD, $STRIPPED_JACKD)
905 AM_CONDITIONAL(HAVE_PPOLL, $HAVE_PPOLL)
911 config/cpu/alpha/Makefile
912 config/cpu/cris/Makefile
913 config/cpu/generic/Makefile
914 config/cpu/i386/Makefile
915 config/cpu/i486/Makefile
916 config/cpu/ia64/Makefile
917 config/cpu/m68k/Makefile
918 config/cpu/mips/Makefile
919 config/cpu/powerpc/Makefile
920 config/cpu/s390/Makefile
922 config/os/generic/Makefile
923 config/os/gnu-linux/Makefile
924 config/os/macosx/Makefile
925 config/sysdeps/Makefile
927 doc/reference.doxygen
929 drivers/alsa/Makefile
930 drivers/alsa-midi/Makefile
931 drivers/dummy/Makefile
934 drivers/portaudio/Makefile
935 drivers/coreaudio/Makefile
936 drivers/freebob/Makefile
937 drivers/firewire/Makefile
938 drivers/netjack/Makefile
939 example-clients/Makefile
952 dnl Output summary message
956 echo $PACKAGE $VERSION :
958 echo \| Build with ALSA support............................... : $HAVE_ALSA
959 echo \| Build with old FireWire \(FreeBob\) support............. : $HAVE_FREEBOB
960 echo \| Build with new FireWire \(FFADO\) support............... : $HAVE_FIREWIRE
961 echo \| Build with OSS support................................ : $HAVE_OSS
962 echo \| Build with Sun audio support.......................... : $HAVE_SUN
963 echo \| Build with CoreAudio support.......................... : $HAVE_COREAUDIO
964 echo \| Build with PortAudio support.......................... : $HAVE_PA
965 echo \| Build with Celt support............................... : $HAVE_CELT
966 echo \| Build with dynamic buffer size support................ : $buffer_resizing
967 echo \| Compiler optimization flags........................... : $JACK_OPT_CFLAGS
968 echo \| Compiler full flags................................... : $CFLAGS
969 echo \| Install dir for libjack + backends.................... : $libdir/jack
971 echo \| Default driver backend................................ : $JACK_DEFAULT_DRIVER
972 echo \| Shared memory interface............................... : $JACK_SHM_TYPE
973 echo \| IPC Temporary directory............................... : $DEFAULT_TMP_DIR
974 echo \| Install prefix........................................ : $prefix
975 echo \| Default tmp dir....................................... : $DEFAULT_TMP_DIR